mirror of https://github.com/python/cpython.git
bpo-45548: makesetup improvements (GH-29225)
* record which modules are build as shared extensions * put object files in same directory as source files * remove dependency on deleted _math.c Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
6afb285ff0
commit
b5ee79494b
|
@ -21,6 +21,7 @@
|
|||
# === Variables set by makesetup ===
|
||||
|
||||
MODBUILT_NAMES= _MODBUILT_NAMES_
|
||||
MODSHARED_NAMES= _MODSHARED_NAMES_
|
||||
MODDISABLED_NAMES= _MODDISABLED_NAMES_
|
||||
MODOBJS= _MODOBJS_
|
||||
MODLIBS= _MODLIBS_
|
||||
|
@ -2120,8 +2121,8 @@ Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h
|
|||
##########################################################################
|
||||
# Module dependencies
|
||||
|
||||
MODULE_CMATH_DEPS=$(srcdir)/Modules/_math.h $(srcdir)/Modules/_math.c
|
||||
MODULE_MATH_DEPS=$(srcdir)/Modules/_math.h $(srcdir)/Modules/_math.c
|
||||
MODULE_CMATH_DEPS=$(srcdir)/Modules/_math.h
|
||||
MODULE_MATH_DEPS=$(srcdir)/Modules/_math.h
|
||||
MODULE_PYEXPAT_DEPS=$(srcdir)/Modules/expat/ascii.h $(srcdir)/Modules/expat/asciitab.h $(srcdir)/Modules/expat/expat.h $(srcdir)/Modules/expat/expat_config.h $(srcdir)/Modules/expat/expat_external.h $(srcdir)/Modules/expat/internal.h $(srcdir)/Modules/expat/latin1tab.h $(srcdir)/Modules/expat/utf8tab.h $(srcdir)/Modules/expat/xmlrole.h $(srcdir)/Modules/expat/xmltok.h $(srcdir)/Modules/expat/xmltok_impl.h
|
||||
MODULE_UNICODEDATA_DEPS=$(srcdir)/Modules/unicodedata_db.h $(srcdir)/Modules/unicodename_db.h
|
||||
MODULE__BLAKE2_DEPS=$(srcdir)/Modules/_blake2/impl/blake2-config.h $(srcdir)/Modules/_blake2/impl/blake2-dispatch.c $(srcdir)/Modules/_blake2/impl/blake2-impl.h $(srcdir)/Modules/_blake2/impl/blake2-kat.h $(srcdir)/Modules/_blake2/impl/blake2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2b-ref.c $(srcdir)/Modules/_blake2/impl/blake2b-round.h $(srcdir)/Modules/_blake2/impl/blake2b-test.c $(srcdir)/Modules/_blake2/impl/blake2b.c $(srcdir)/Modules/_blake2/impl/blake2bp-test.c $(srcdir)/Modules/_blake2/impl/blake2bp.c $(srcdir)/Modules/_blake2/impl/blake2s-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2s-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2s-load-xop.h $(srcdir)/Modules/_blake2/impl/blake2s-ref.c $(srcdir)/Modules/_blake2/impl/blake2s-round.h $(srcdir)/Modules/_blake2/impl/blake2s-test.c $(srcdir)/Modules/_blake2/impl/blake2s.c $(srcdir)/Modules/_blake2/impl/blake2sp-test.c $(srcdir)/Modules/_blake2/impl/blake2sp.c $(srcdir)/Modules/hashlib.h
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
# - insert an identifying comment at the start
|
||||
# - replace _MODBUILT_NAMES_ by the list of *static* and *shared* modules
|
||||
# from Setup
|
||||
# - replace _MODBSHARED_NAMES_ by the list of *shared* modules from Setup
|
||||
# - replace _MODDISABLED_NAMES_ by the list of *disabled* modules from Setup
|
||||
# - replace _MODOBJS_ by the list of objects from Setup (except for
|
||||
# Setup files after a -n option)
|
||||
|
@ -114,6 +115,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
|||
" >$rulesf
|
||||
DEFS=
|
||||
BUILT=
|
||||
BUILT_SHARED=
|
||||
DISABLED=
|
||||
MODS=
|
||||
SHAREDMODS=
|
||||
|
@ -222,7 +224,10 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
|||
*.m) obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C
|
||||
*) continue;;
|
||||
esac
|
||||
obj="$srcdir/$obj"
|
||||
case $src in
|
||||
*/*) obj="$srcdir/`dirname $src`/$obj";;
|
||||
*) obj="$srcdir/$obj";;
|
||||
esac
|
||||
objs="$objs $obj"
|
||||
case $src in
|
||||
glmodule.c) ;;
|
||||
|
@ -246,7 +251,10 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
|||
do
|
||||
file="$srcdir/$mod\$(EXT_SUFFIX)"
|
||||
case $doconfig in
|
||||
no) SHAREDMODS="$SHAREDMODS $file";;
|
||||
no)
|
||||
SHAREDMODS="$SHAREDMODS $file"
|
||||
BUILT_SHARED="$BUILT_SHARED $mod"
|
||||
;;
|
||||
esac
|
||||
rule="$file: $objs"
|
||||
rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
|
||||
|
@ -296,6 +304,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
|||
str="# Generated automatically from $makepre by makesetup."
|
||||
echo "$str" >>$sedf
|
||||
echo "s%_MODBUILT_NAMES_%$BUILT%" >>$sedf
|
||||
echo "s%_MODSHARED_NAMES_%$BUILT_SHARED%" >>$sedf
|
||||
echo "s%_MODDISABLED_NAMES_%$DISABLED%" >>$sedf
|
||||
echo "s%_MODOBJS_%$OBJS%" >>$sedf
|
||||
echo "s%_MODLIBS_%$LIBS%" >>$sedf
|
||||
|
|
Loading…
Reference in New Issue