[Python-checkins] cpython (merge 2.7 -> 2.7): merge heads

benjamin.peterson python-checkins at python.org
Tue Oct 16 15:52:08 CEST 2012


http://hg.python.org/cpython/rev/ad0efab568ec
changeset:   79757:ad0efab568ec
branch:      2.7
parent:      79756:a7d8c28280c0
parent:      79755:e0a2b14a3cf9
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Oct 16 09:52:02 2012 -0400
summary:
  merge heads

files:
  Makefile.pre.in |   1 +
  configure       |  18 ++++++++++++++++++
  configure.ac    |  16 ++++++++++++++++
  3 files changed, 35 insertions(+), 0 deletions(-)


diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -27,6 +27,7 @@
 VERSION=	@VERSION@
 srcdir=		@srcdir@
 VPATH=		@srcdir@
+BUILDDIR=	@BUILDDIR@
 
 CC=		@CC@
 CXX=		@CXX@
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -648,6 +648,8 @@
 HGBRANCH
 HGTAG
 HGVERSION
+BASECPPFLAGS
+BUILDDIR
 SVNVERSION
 ARFLAGS
 AR
@@ -5175,6 +5177,22 @@
 	SVNVERSION="echo Unversioned directory"
 fi
 
+BUILDDIR="`pwd`"
+
+
+if test "$srcdir" != "$BUILDDIR"; then
+    # If we're building out-of-tree make sure Include (in the current dir)
+    # gets picked up before its $srcdir counterpart in order for Python-ast.h
+    # and graminit.h to get picked up from the correct directory.
+    # (A side effect of this is that these resources will automatically be
+    #  regenerated when building out-of-tree, regardless of whether or not
+    #  the $srcdir counterpart is up-to-date.  This is an acceptable trade
+    #  off.)
+    BASECPPFLAGS="-IInclude"
+else
+    BASECPPFLAGS=""
+fi
+
 
 
 
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -854,6 +854,22 @@
 	SVNVERSION="echo Unversioned directory"
 fi
 
+BUILDDIR="`pwd`"
+AC_SUBST(BUILDDIR)
+AC_SUBST(BASECPPFLAGS)
+if test "$srcdir" != "$BUILDDIR"; then
+    # If we're building out-of-tree make sure Include (in the current dir)
+    # gets picked up before its $srcdir counterpart in order for Python-ast.h
+    # and graminit.h to get picked up from the correct directory.
+    # (A side effect of this is that these resources will automatically be
+    #  regenerated when building out-of-tree, regardless of whether or not
+    #  the $srcdir counterpart is up-to-date.  This is an acceptable trade
+    #  off.)
+    BASECPPFLAGS="-IInclude"
+else
+    BASECPPFLAGS=""
+fi
+
 AC_SUBST(HGVERSION)
 AC_SUBST(HGTAG)
 AC_SUBST(HGBRANCH)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list