distutils parsing Makefile?

Hi all, I have a patch at source-forge I would like some distutils related input on. www.python.org/sf/566100 - Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT In particular, Makefile.pre.in has been modified thus: <patch> RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v retrieving revision 1.86 diff -u -r1.86 Makefile.pre.in --- Makefile.pre.in 21 Jun 2002 14:48:36 -0000 1.86 +++ Makefile.pre.in 5 Jul 2002 06:41:28 -0000 @@ -65,7 +65,7 @@ # Extra C flags added for building the interpreter object files. CFLAGSFORSHARED=@CFLAGSFORSHARED@ # C flags used for building the interpreter object files -PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) +PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE # Machine-dependent subdirectories </patch> The idea is that Py_BUILD_CORE is defined *only* when building Python itself and builtin modules, but not for extension modules. On python-dev, Guido raised the following concern: <quote> My only concern would be that tools which parse the Makefile (I believe distutils does this?) should not accidentally pick up the "-DPy_BUILD_CORE" flag. </quote> Can anyone here tell me if this will be an issue for distutils? Does distutils do any parsing of the Makefile, and if so, is my change likely to work as intended? Thanks, Mark.

On Thu, Jul 18, 2002 at 04:24:40PM +1000, Mark Hammond wrote:
distutils.sysconfig.parse_makefile() handles parsing of Makefiles. extension.py uses it to parse the Setup file, and sysconfig.py parses the main Makefile and then looks for a few settings such as LDSHARED. It doesn't look for PY_CFLAGS, so this change should be safe. --amk

On Thu, Jul 18, 2002 at 04:24:40PM +1000, Mark Hammond wrote:
distutils.sysconfig.parse_makefile() handles parsing of Makefiles. extension.py uses it to parse the Setup file, and sysconfig.py parses the main Makefile and then looks for a few settings such as LDSHARED. It doesn't look for PY_CFLAGS, so this change should be safe. --amk
participants (2)
-
Andrew Kuchling
-
Mark Hammond