From f8968d8b32fc9996b8134d2fc3073bbaa85440f6 Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Tue, 16 Oct 2012 08:41:32 -0400 Subject: 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. --- configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 84d723aa8a..9222c887c3 100644 --- a/configure.ac +++ b/configure.ac @@ -830,6 +830,24 @@ else 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, 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) -- cgit v1.2.1