[Distutils] distutils parsing Makefile?

Mark Hammond mhammond@skippinet.com.au
Thu Jul 18 14:21:46 2002


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.