File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2572,7 +2572,9 @@ Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h
25722572##########################################################################
25732573# Module dependencies and platform-specific files
25742574
2575- MODULE_DEPS=$(PYTHON_HEADERS) Modules/config.c $(EXPORTSYMS)
2575+ # force rebuild when header file or module build flavor (static/shared) is changed
2576+ MODULE_DEPS_STATIC=Modules/config.c
2577+ MODULE_DEPS_SHARED=$(MODULE_DEPS_STATIC) $(EXPORTSYMS)
25762578
25772579MODULE_CMATH_DEPS=$(srcdir)/Modules/_math.h
25782580MODULE_MATH_DEPS=$(srcdir)/Modules/_math.h
Original file line number Diff line number Diff line change @@ -262,12 +262,15 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
262262 esac
263263 # custom flags first, PY_STDMODULE_CFLAGS may contain -I with system libmpdec
264264 case $doconfig in
265- no) cc=" $cc $cpps \$ (PY_STDMODULE_CFLAGS) \$ (CCSHARED)" ;;
265+ no)
266+ cc=" $cc $cpps \$ (PY_STDMODULE_CFLAGS) \$ (CCSHARED)"
267+ rule=" $obj : $src \$ (MODULE_${mods_upper} _DEPS) \$ (MODULE_DEPS_SHARED) \$ (PYTHON_HEADERS); $cc -c $src -o $obj "
268+ ;;
266269 * )
267- cc=" $cc $cpps \$ (PY_BUILTIN_MODULE_CFLAGS)" ;;
270+ cc=" $cc $cpps \$ (PY_BUILTIN_MODULE_CFLAGS)"
271+ rule=" $obj : $src \$ (MODULE_${mods_upper} _DEPS) \$ (MODULE_DEPS_STATIC) \$ (PYTHON_HEADERS); $cc -c $src -o $obj "
272+ ;;
268273 esac
269- # force rebuild when header file or module build flavor (static/shared) is changed
270- rule=" $obj : $src \$ (MODULE_${mods_upper} _DEPS) \$ (MODULE_DEPS); $cc -c $src -o $obj "
271274 echo " $rule " >> $rulesf
272275 done
273276 case $doconfig in
You can’t perform that action at this time.
0 commit comments