diff options
author | Trent Nelson <trent@trent.me> | 2012-10-16 12:51:24 (GMT) |
---|---|---|
committer | Trent Nelson <trent@trent.me> | 2012-10-16 12:51:24 (GMT) |
commit | 4d4ec6502d6aec31284cf2f68d81c64fcedb1049 (patch) | |
tree | c09fbdb6f1a59f286ccdc1199c7a86a7dec144d7 /configure.ac | |
parent | c101bf32c4011a3c7f3249b8c15bcf95b944095b (diff) | |
parent | 9effe699b7858a4a654b34915bc0e2cbec0de1f3 (diff) | |
download | cpython-4d4ec6502d6aec31284cf2f68d81c64fcedb1049.zip cpython-4d4ec6502d6aec31284cf2f68d81c64fcedb1049.tar.gz cpython-4d4ec6502d6aec31284cf2f68d81c64fcedb1049.tar.bz2 |
Merge issue #15819: additional fixes for out-of-tree builds from read-only src.
Specifically, make sure the 'Object', 'Python' and 'Include' directories
in the build directory take precedence over the source directory if we're
an out-of-tree build.
Fix typeslots.inc so that it gets generated into the build directory.
In addition, for 3.3, make sure importlib.h gets generated into the
build directory.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e3f5b96..0633a97 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,24 @@ AC_PREREQ(2.65) AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) +BUILDDIR="`pwd`" +AC_SUBST(BUILDDIR) +AC_SUBST(BASECPPFLAGS) +if test "$srcdir" != "$BUILDDIR"; then + # If we're building out-of-tree, we need to make sure the following + # resources get picked up before their $srcdir counterparts. + # Objects/ -> typeslots.inc + # Include/ -> Python-ast.h, graminit.h + # Python/ -> importlib.h + # (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="-IObjects -IInclude -IPython" +else + BASECPPFLAGS="" +fi + AC_SUBST(HGVERSION) AC_SUBST(HGTAG) AC_SUBST(HGBRANCH) |