diff options
author | Christian Heimes <christian@python.org> | 2021-10-29 15:49:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 15:49:57 (GMT) |
commit | f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8 (patch) | |
tree | 0af6f5979b7f5a9e75db0b4aa57abf4b15e7e2ef /Modules/makesetup | |
parent | d9575218d7ab3d85b15ce3d4779660b9b724d343 (diff) | |
download | cpython-f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8.zip cpython-f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8.tar.gz cpython-f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8.tar.bz2 |
bpo-45548: Some test modules must be built as shared libs (GH-29268)
Some test cases don't work when test modules are static extensions.
Add dependency on Modules/config.c to trigger a rebuild whenever a
module build type is changed.
``makesetup`` puts shared extensions into ``Modules/`` directory. Create
symlinks from pybuilddir so the extensions can be imported.
Note: It is not possible to use the content of pybuilddir.txt as a build
target. Makefile evaluates target variables in the first pass. The
pybuilddir.txt file does not exist at that point.
Diffstat (limited to 'Modules/makesetup')
-rwxr-xr-x | Modules/makesetup | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/makesetup b/Modules/makesetup index 7547315..543992c 100755 --- a/Modules/makesetup +++ b/Modules/makesetup @@ -241,7 +241,8 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | cc="$cc \$(PY_BUILTIN_MODULE_CFLAGS)";; esac mods_upper=$(echo $mods | tr '[a-z]' '[A-Z]') - rule="$obj: $src \$(MODULE_${mods_upper}_DEPS) \$(PYTHON_HEADERS); $cc $cpps -c $src -o $obj" + # force rebuild when header file or module build flavor (static/shared) is changed + rule="$obj: $src \$(MODULE_${mods_upper}_DEPS) \$(PYTHON_HEADERS) Modules/config.c; $cc $cpps -c $src -o $obj" echo "$rule" >>$rulesf done case $doconfig in |