summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorTrent Nelson <trent@trent.me>2012-08-30 14:32:02 (GMT)
committerTrent Nelson <trent@trent.me>2012-08-30 14:32:02 (GMT)
commita45afcada37d7945a97ed6d0c241f0b0468e7932 (patch)
treea368751e55b6664493975ab8a4b0716700c949ed /Makefile.pre.in
parentecc4757b79c7d8f7b09fbc2e8b24258c22cfed12 (diff)
downloadcpython-a45afcada37d7945a97ed6d0c241f0b0468e7932.zip
cpython-a45afcada37d7945a97ed6d0c241f0b0468e7932.tar.gz
cpython-a45afcada37d7945a97ed6d0c241f0b0468e7932.tar.bz2
Issue #15819: Fix out-of-tree builds from a readonly source.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index de08382..63ffc7d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -59,6 +59,8 @@ INSTALL_DATA= @INSTALL_DATA@
# Also, making them read-only seems to be a good idea...
INSTALL_SHARED= ${INSTALL} -m 555
+MKDIR_P= @MKDIR_P@
+
MAKESETUP= $(srcdir)/Modules/makesetup
# Compiler options
@@ -223,8 +225,8 @@ IO_OBJS= \
##########################################################################
# Grammar
-GRAMMAR_H= $(srcdir)/Include/graminit.h
-GRAMMAR_C= $(srcdir)/Python/graminit.c
+GRAMMAR_H= Include/graminit.h
+GRAMMAR_C= Python/graminit.c
GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
@@ -266,9 +268,9 @@ PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS)
##########################################################################
# AST
-AST_H_DIR= $(srcdir)/Include
+AST_H_DIR= Include
AST_H= $(AST_H_DIR)/Python-ast.h
-AST_C_DIR= $(srcdir)/Python
+AST_C_DIR= Python
AST_C= $(AST_C_DIR)/Python-ast.c
AST_ASDL= $(srcdir)/Parser/Python.asdl
@@ -609,9 +611,11 @@ Parser/tokenizer_pgen.o: $(srcdir)/Parser/tokenizer.c
Parser/pgenmain.o: $(srcdir)/Include/parsetok.h
$(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
+ $(MKDIR_P) $(AST_H_DIR)
$(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
$(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
+ $(MKDIR_P) $(AST_C_DIR)
$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)