diff options
author | Brett Cannon <bcannon@gmail.com> | 2004-12-07 00:42:59 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2004-12-07 00:42:59 (GMT) |
commit | 516592f4ff13ee39ebd115088c7429631328e2db (patch) | |
tree | af28df7b8f8b80cc02cb20cb61abbaba684771f7 /Makefile.pre.in | |
parent | 9e635cf3ae1d912dc32d3ff2d5ebc529c92bf389 (diff) | |
download | cpython-516592f4ff13ee39ebd115088c7429631328e2db.zip cpython-516592f4ff13ee39ebd115088c7429631328e2db.tar.gz cpython-516592f4ff13ee39ebd115088c7429631328e2db.tar.bz2 |
setup.py now uses the library directories specified in LDFLAGS (``-L``
directories) and the include directories specified in CPPFLAGS (``-I``
directories) for compiling the extension modules.
This has led to the core being compiled with the values in the shell's
CPPFLAGS. It has also removed the need for special casing to use Fink and
DarwinPorts under darwin since the needed directories can now be specified in
LDFLAGS and CPPFLAGS (e.g., DarwinPorts users can now do
``LDFLAGS=-L/opt/local/lib; CPPFLAGS=-I/opt/local/include; ./configure`` for
everything to work properly).
Parsing the values in the environment variables is done with getopt. While optparse
would have been a nicer solution it cannot be used because of dependency issues
at execution time; optparse uses gettext which uses struct which will not have
been compiled when the code is imported. If optparse ever makes its
importation of gettext optional by catching ImportError and setting _() to an
identity function then it can be used.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index d1ea4e2..16cb0fa 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -56,7 +56,10 @@ MAKESETUP= $(srcdir)/Modules/makesetup OPT= @OPT@ BASECFLAGS= @BASECFLAGS@ CFLAGS= $(BASECFLAGS) $(OPT) -CPPFLAGS= -I. -I$(srcdir)/Include +# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to +# be able to build extension modules using the directories specified in the +# environment variables +CPPFLAGS= -I. -I$(srcdir)/Include @CPPFLAGS@ LDFLAGS= @LDFLAGS@ LDLAST= @LDLAST@ SGI_ABI= @SGI_ABI@ |