summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-26 11:09:47 (GMT)
committerGitHub <noreply@github.com>2019-04-26 11:09:47 (GMT)
commit06d04e77ca36133e82bf6c363c09ba82e07a9c75 (patch)
tree614dc56d62ac5b30b0b152f42fc3e394af8024dd /Makefile.pre.in
parent4cb525a1f0cba152d1da61e531f2ad5db633120a (diff)
downloadcpython-06d04e77ca36133e82bf6c363c09ba82e07a9c75.zip
cpython-06d04e77ca36133e82bf6c363c09ba82e07a9c75.tar.gz
cpython-06d04e77ca36133e82bf6c363c09ba82e07a9c75.tar.bz2
bpo-36733: Fix PYTHONPATH for make regen-add (GH-12969)
Add PYTHONPATH=$(srcdir) to run $(PYTHON_FOR_REGEN) -m Parser.pgen, so it's possible to build Python from a different directory.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 68ac772..d06ad0b 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -791,7 +791,7 @@ regen-grammar: regen-token
# Regenerate Include/graminit.h and Python/graminit.c
# from Grammar/Grammar using pgen
@$(MKDIR_P) Include
- $(PYTHON_FOR_REGEN) -m Parser.pgen $(srcdir)/Grammar/Grammar \
+ PYTHONPATH=$(srcdir) $(PYTHON_FOR_REGEN) -m Parser.pgen $(srcdir)/Grammar/Grammar \
$(srcdir)/Grammar/Tokens \
$(srcdir)/Include/graminit.h.new \
$(srcdir)/Python/graminit.c.new
@@ -849,7 +849,7 @@ regen-token:
regen-keyword:
# Regenerate Lib/keyword.py from Grammar/Grammar and Grammar/Tokens
# using Parser/pgen
- $(PYTHON_FOR_REGEN) -m Parser.pgen.keywordgen $(srcdir)/Grammar/Grammar \
+ PYTHONPATH=$(srcdir) $(PYTHON_FOR_REGEN) -m Parser.pgen.keywordgen $(srcdir)/Grammar/Grammar \
$(srcdir)/Grammar/Tokens \
$(srcdir)/Lib/keyword.py.new
$(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new