summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.pre.in9
-rw-r--r--Misc/NEWS2
2 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9bcbdab..31e7f2e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -536,9 +536,12 @@ Modules/python.o: $(srcdir)/Modules/python.c
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+# Use a stamp file to prevent make -j invoking pgen twice
+$(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
+Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
-@$(INSTALL) -d Include
- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ -touch Parser/pgen.stamp
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
@@ -1184,7 +1187,7 @@ profile-removal:
clobber: clean profile-removal
-rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
- tags TAGS \
+ tags TAGS Parser/pgen.stamp \
config.cache config.log pyconfig.h Modules/config.c
-rm -rf build platform
-rm -rf $(PYTHONFRAMEWORKDIR)
diff --git a/Misc/NEWS b/Misc/NEWS
index 22810fe..a410b94 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -105,6 +105,8 @@ Extension Modules
Build
-----
+- Don't run pgen twice when using make -j.
+
- Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in
the configure script but use $GREP instead. Patch by Fabian Groffen.