summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-11-18 08:18:44 (GMT)
committerGitHub <noreply@github.com>2021-11-18 08:18:44 (GMT)
commit25ecc040d007a55e4b5c30fa739054b52c1aacac (patch)
treea804c5fba2fba0e13a45dbd723eafee1f08f833f /Makefile.pre.in
parentfc4474e45eecbea8e88095f28c98c5d56438d841 (diff)
downloadcpython-25ecc040d007a55e4b5c30fa739054b52c1aacac.zip
cpython-25ecc040d007a55e4b5c30fa739054b52c1aacac.tar.gz
cpython-25ecc040d007a55e4b5c30fa739054b52c1aacac.tar.bz2
bpo-45573: Introduce extension module flags in Makefile (GH-29594)
``configure`` now uses a standardized format to forward state, compiler flags, and linker flags to ``Makefile``, ``setup.py``, and ``Modules/Setup``. ``makesetup`` use the new variables by default if a module line does not contain any compiler or linker flags. ``setup.py`` has a new function ``addext()``. For a module ``egg``, configure adds: * ``MODULE_EGG`` with value yes, missing, disabled, or n/a * ``MODULE_EGG_CFLAGS`` * ``MODULE_EGG_LDFLAGS`` ``Makefile.pre.in`` may also provide ``MODULE_EGG_DEPS`` that lists dependencies such as header files and static libs. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 1535cab..55336d2 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -201,12 +201,26 @@ RUNSHARED= @RUNSHARED@
# ensurepip options
ENSUREPIP= @ENSUREPIP@
+# Internal static libraries
+LIBMPDEC_A= Modules/_decimal/libmpdec/libmpdec.a
+LIBEXPAT_A= Modules/expat/libexpat.a
+
# OpenSSL options for setup.py so sysconfig can pick up AC_SUBST() vars.
OPENSSL_INCLUDES=@OPENSSL_INCLUDES@
OPENSSL_LIBS=@OPENSSL_LIBS@
OPENSSL_LDFLAGS=@OPENSSL_LDFLAGS@
OPENSSL_RPATH=@OPENSSL_RPATH@
+# Module compiler and linker flags
+# yes: module is available
+# missing: build dependency is missing
+# disabled: module is disabled
+# n/a: module is not available on the current platform
+# MODULE_EGG=yes # yes, missing, disabled, n/a
+# MODULE_EGG_CFLAGS=
+# MODULE_EGG_LDFLAGS=
+@MODULE_BLOCK@
+
# Default zoneinfo.TZPATH. Added here to expose it in sysconfig.get_config_var
TZPATH=@TZPATH@
@@ -535,8 +549,6 @@ LIBMPDEC_HEADERS= \
$(srcdir)/Modules/_decimal/libmpdec/typearith.h \
$(srcdir)/Modules/_decimal/libmpdec/umodarith.h
-LIBMPDEC_A= Modules/_decimal/libmpdec/libmpdec.a
-
##########################################################################
# pyexpat's expat library
@@ -562,8 +574,6 @@ LIBEXPAT_HEADERS= \
Modules/expat/xmltok.h \
Modules/expat/xmltok_impl.h
-LIBEXPAT_A= Modules/expat/libexpat.a
-
#########################################################################
# Rules