summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTrent Nelson <trent@trent.me>2012-10-16 13:42:45 (GMT)
committerTrent Nelson <trent@trent.me>2012-10-16 13:42:45 (GMT)
commitd86ceecf2141e684364d31c28941c6aacfbba47a (patch)
tree6d043333b42c758e4dcfae1f03ed4fc26d6d5639 /configure
parentae1d185750af0659154def9b428749ccdf03f782 (diff)
downloadcpython-d86ceecf2141e684364d31c28941c6aacfbba47a.zip
cpython-d86ceecf2141e684364d31c28941c6aacfbba47a.tar.gz
cpython-d86ceecf2141e684364d31c28941c6aacfbba47a.tar.bz2
Issue #15819: additional fixes for out-of-tree builds from read-only src.
Unlike 3.2, 3.3 and 3.x, which add "-IObjects -IPython -IInclude" to BASECPPFLAGS when building out-of-tree, 2.7 only needs to add -IInclude (for Python-ast.h and graminit.h).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index bced441..f2304f6 100755
--- a/configure
+++ b/configure
@@ -648,6 +648,8 @@ HAS_HG
HGBRANCH
HGTAG
HGVERSION
+BASECPPFLAGS
+BUILDDIR
SVNVERSION
ARFLAGS
AR
@@ -5175,6 +5177,22 @@ else
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
+