[Python-checkins] cpython: Issue #15819: Fix out-of-tree builds from a readonly source.

trent.nelson python-checkins at python.org
Thu Aug 30 16:52:52 CEST 2012


http://hg.python.org/cpython/rev/ab6ab44921b2
changeset:   78811:ab6ab44921b2
user:        Trent Nelson <trent at trent.me>
date:        Thu Aug 30 14:52:38 2012 +0000
summary:
  Issue #15819: Fix out-of-tree builds from a readonly source.

files:
  Makefile.pre.in |  10 ++++++----
  Misc/NEWS       |   3 +++
  2 files changed, 9 insertions(+), 4 deletions(-)


diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -229,8 +229,8 @@
 
 ##########################################################################
 # 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
 
 
@@ -296,9 +296,9 @@
 
 ##########################################################################
 # 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
 
@@ -665,9 +665,11 @@
 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_H) $(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)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,6 +25,9 @@
 Build
 -----
 
+- Issue #15819: Make sure we can build Python out-of-tree from a readonly
+  source directory.  (Somewhat related to Issue #9860.)
+
 Documentation
 -------------
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list