[Distutils] distutils parsing Makefile?

Andrew Kuchling akuchlin@mems-exchange.org
Thu Jul 18 15:02:03 2002


On Thu, Jul 18, 2002 at 04:24:40PM +1000, Mark Hammond wrote:
>-PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED)
>+PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
>
>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?

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