]> granicus.if.org Git - python/commitdiff
Issue #1628484: The Makefile doesn't ignore the CFLAGS environment
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 21 Mar 2010 19:19:41 +0000 (19:19 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 21 Mar 2010 19:19:41 +0000 (19:19 +0000)
variable anymore.  It also forwards the LDFLAGS settings to the linker
when building a shared library.

Makefile.pre.in
Misc/NEWS

index 0c1b11b199490dd4cffb2e9b3484063e4516fcc0..6b8b7394b8bd4a94ecb37740e88d8c44457cb0c5 100644 (file)
@@ -59,7 +59,7 @@ MAKESETUP=      $(srcdir)/Modules/makesetup
 # Compiler options
 OPT=           @OPT@
 BASECFLAGS=    @BASECFLAGS@
-CFLAGS=                $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
+CFLAGS=                $(BASECFLAGS) @CFLAGS@ $(OPT) $(EXTRA_CFLAGS)
 # 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
@@ -89,8 +89,8 @@ exec_prefix=  @exec_prefix@
 datarootdir=    @datarootdir@
 
 # Expanded directories
-BINDIR=                $(exec_prefix)/bin
-LIBDIR=                $(exec_prefix)/lib
+BINDIR=                @bindir@
+LIBDIR=                @libdir@
 MANDIR=                @mandir@
 INCLUDEDIR=    @includedir@
 CONFINCLUDEDIR=        $(exec_prefix)/include
@@ -401,8 +401,8 @@ platform: $(BUILDPYTHON)
 # Build the shared modules
 sharedmods: $(BUILDPYTHON)
        @case $$MAKEFLAGS in \
-       *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-       *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+       *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+       *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
        esac
 
 # Build static library
index c9c5989d4cb6d37bb7f4b53ab888f208429fb371..48fe18d272db4c4bdffd2635488109c5be120614 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -91,6 +91,10 @@ Tools/Demos
 Build
 -----
 
+- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment
+  variable anymore.  It also forwards the LDFLAGS settings to the linker
+  when building a shared library.
+
 - Issue #6716: Quote -x arguments of compileall in MSI installer.
 
 - Issue #7705: Fix linking on FreeBSD.