-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Python 2.5.6 for parallel pgen invocation
Backported from https://github.com/python/cpython/commit/9828b56347f6171a532dce28c9dc5ab9bd2c8139.patch
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
SPDX-FileCopyrightText: 2011 Antoine Pitrou <[email protected]> | ||
|
||
SPDX-License-Identifier: PSF-2.0 | ||
|
||
Don't run pgen twice when using make -j | ||
Don't ignore pgen error (on "make Parser/pgen.stamp") | ||
|
||
diff --git a/Makefile.pre.in b/Makefile.pre.in | ||
index 25a82aff01..03f85fd04b 100644 | ||
--- Makefile.pre.in | ||
+++ Makefile.pre.in | ||
@@ -471,10 +471,12 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile | ||
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) | ||
-@ mkdir 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) | ||
@@ -1030,7 +1032,7 @@ clean: pycremoval | ||
|
||
clobber: clean | ||
-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) |