@@ -580,8 +580,8 @@ LIBEXPAT_HEADERS= \
580
580
581
581
# Default target
582
582
all: @DEF_MAKE_ALL_RULE@
583
- build_all: check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \
584
- Programs/_testembed python-config
583
+ build_all: check-clean-src $(BUILDPYTHON) platform oldsharedmods sharedmods \
584
+ gdbhooks Programs/_testembed python-config
585
585
build_wasm: check-clean-src $(BUILDPYTHON) platform oldsharedmods python-config
586
586
587
587
# Check that the source is clean when building out of source.
@@ -1671,7 +1671,7 @@ cleantest: all
1671
1671
1672
1672
# Run a basic set of regression tests.
1673
1673
# This excludes some tests that are particularly resource-intensive.
1674
- test: @DEF_MAKE_RULE@ platform
1674
+ test: all
1675
1675
$(TESTRUNNER) $(TESTOPTS)
1676
1676
1677
1677
# Run the full test suite twice - once without .pyc files, and once with.
@@ -1681,7 +1681,7 @@ test: @DEF_MAKE_RULE@ platform
1681
1681
# the bytecode read from a .pyc file had the bug, sometimes the directly
1682
1682
# generated bytecode. This is sometimes a very shy bug needing a lot of
1683
1683
# sample data.
1684
- testall: @DEF_MAKE_RULE@ platform
1684
+ testall: all
1685
1685
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
1686
1686
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
1687
1687
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
@@ -1690,7 +1690,7 @@ testall: @DEF_MAKE_RULE@ platform
1690
1690
1691
1691
# Run the test suite for both architectures in a Universal build on OSX.
1692
1692
# Must be run on an Intel box.
1693
- testuniversal: @DEF_MAKE_RULE@ platform
1693
+ testuniversal: all
1694
1694
@if [ `arch` != 'i386' ]; then \
1695
1695
echo "This can only be used on OSX/i386" ;\
1696
1696
exit 1 ;\
@@ -1701,7 +1701,7 @@ testuniversal: @DEF_MAKE_RULE@ platform
1701
1701
1702
1702
# Like testall, but with only one pass and without multiple processes.
1703
1703
# Run an optional script to include information about the build environment.
1704
- buildbottest: all platform
1704
+ buildbottest: all
1705
1705
-@if which pybuildbot.identify >/dev/null 2>&1; then \
1706
1706
pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
1707
1707
fi
@@ -1716,7 +1716,7 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
1716
1716
test_multiprocessing_forkserver \
1717
1717
test_mailbox test_nntplib test_socket test_poll \
1718
1718
test_select test_zipfile test_concurrent_futures
1719
- quicktest: @DEF_MAKE_RULE@ platform
1719
+ quicktest: all
1720
1720
$(TESTRUNNER) $(QUICKTESTOPTS)
1721
1721
1722
1722
# SSL tests
@@ -1727,6 +1727,10 @@ multisslcompile: all
1727
1727
multissltest: all
1728
1728
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py
1729
1729
1730
+ # All install targets use the "all" target as synchronization point to
1731
+ # prevent race conditions with PGO builds. PGO builds use recursive make,
1732
+ # which can lead to two parallel `./python setup.py build` processes that
1733
+ # step on each others toes.
1730
1734
install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKINSTALLLAST@
1731
1735
if test "x$(ENSUREPIP)" != "xno" ; then \
1732
1736
case $(ENSUREPIP) in \
@@ -1755,7 +1759,7 @@ commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
1755
1759
# Install shared libraries enabled by Setup
1756
1760
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
1757
1761
1758
- oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
1762
+ oldsharedinstall: $(DESTSHARED) all
1759
1763
@for i in X $(SHAREDMODS); do \
1760
1764
if test $$i != X; then \
1761
1765
echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
@@ -2161,7 +2165,7 @@ LIBPL= @LIBPL@
2161
2165
# pkgconfig directory
2162
2166
LIBPC= $(LIBDIR)/pkgconfig
2163
2167
2164
- libainstall: @DEF_MAKE_RULE@ python-config
2168
+ libainstall: all python-config
2165
2169
@for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \
2166
2170
do \
2167
2171
if test ! -d $(DESTDIR)$$i; then \
@@ -2215,7 +2219,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
2215
2219
2216
2220
# Install the dynamically loadable modules
2217
2221
# This goes into $(exec_prefix)
2218
- sharedinstall: sharedmods
2222
+ sharedinstall: all
2219
2223
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
2220
2224
--prefix=$(prefix) \
2221
2225
--install-scripts=$(BINDIR) \
@@ -2445,7 +2449,7 @@ distclean: clobber
2445
2449
-exec rm -f {} ';'
2446
2450
2447
2451
# Check that all symbols exported by libpython start with "Py" or "_Py"
2448
- smelly: @DEF_MAKE_RULE@
2452
+ smelly: all
2449
2453
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/smelly.py
2450
2454
2451
2455
# Find files with funny names
@@ -2480,7 +2484,7 @@ funny:
2480
2484
-o -print
2481
2485
2482
2486
# Perform some verification checks on any modified files.
2483
- patchcheck: @DEF_MAKE_RULE@
2487
+ patchcheck: all
2484
2488
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
2485
2489
2486
2490
check-limited-abi: all
0 commit comments