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 /Makefile.pre.in | |
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 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 10ad381..4ff801b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -27,6 +27,8 @@ MODLIBS= _MODLIBS_ VERSION= @VERSION@ srcdir= @srcdir@ VPATH= @srcdir@ +BUILDDIR= @BUILDDIR@ + CC= @CC@ CXX= @CXX@ @@ -66,6 +68,7 @@ MAKESETUP= $(srcdir)/Modules/makesetup # Compiler options OPT= @OPT@ BASECFLAGS= @BASECFLAGS@ +BASECPPFLAGS= @BASECPPFLAGS@ CONFIGURE_CFLAGS= @CFLAGS@ CONFIGURE_CPPFLAGS= @CPPFLAGS@ CONFIGURE_LDFLAGS= @LDFLAGS@ @@ -76,7 +79,7 @@ PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(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 -PY_CPPFLAGS= -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) +PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) NO_AS_NEEDED= @NO_AS_NEEDED@ LDLAST= @LDLAST@ @@ -310,7 +313,7 @@ ASDLGEN= @DISABLE_ASDLGEN@ $(srcdir)/Parser/asdl_c.py # Python OPCODETARGETS_H= \ - $(srcdir)/Python/opcode_targets.h + Python/opcode_targets.h OPCODETARGETGEN= \ $(srcdir)/Python/makeopcodetargets.py @@ -725,11 +728,11 @@ Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \ $(BYTESTR_DEPS) -Python/frozen.o: $(srcdir)/Python/importlib.h +Python/frozen.o: Python/importlib.h -Objects/typeobject.o: $(srcdir)/Objects/typeslots.inc -$(srcdir)/Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py - $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > $(srcdir)/Objects/typeslots.inc +Objects/typeobject.o: Objects/typeslots.inc +Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py + $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc ############################################################################ # Header files |