@@ -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.
@@ -1663,7 +1663,7 @@ cleantest: all
1663
1663
1664
1664
# Run a basic set of regression tests.
1665
1665
# This excludes some tests that are particularly resource-intensive.
1666
- test: @DEF_MAKE_RULE@ platform
1666
+ test: all
1667
1667
$(TESTRUNNER) $(TESTOPTS)
1668
1668
1669
1669
# Run the full test suite twice - once without .pyc files, and once with.
@@ -1673,7 +1673,7 @@ test: @DEF_MAKE_RULE@ platform
1673
1673
# the bytecode read from a .pyc file had the bug, sometimes the directly
1674
1674
# generated bytecode. This is sometimes a very shy bug needing a lot of
1675
1675
# sample data.
1676
- testall: @DEF_MAKE_RULE@ platform
1676
+ testall: all
1677
1677
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
1678
1678
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
1679
1679
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
@@ -1682,7 +1682,7 @@ testall: @DEF_MAKE_RULE@ platform
1682
1682
1683
1683
# Run the test suite for both architectures in a Universal build on OSX.
1684
1684
# Must be run on an Intel box.
1685
- testuniversal: @DEF_MAKE_RULE@ platform
1685
+ testuniversal: all
1686
1686
@if [ `arch` != 'i386' ]; then \
1687
1687
echo "This can only be used on OSX/i386" ;\
1688
1688
exit 1 ;\
@@ -1693,7 +1693,7 @@ testuniversal: @DEF_MAKE_RULE@ platform
1693
1693
1694
1694
# Like testall, but with only one pass and without multiple processes.
1695
1695
# Run an optional script to include information about the build environment.
1696
- buildbottest: all platform
1696
+ buildbottest: all
1697
1697
-@if which pybuildbot.identify >/dev/null 2>&1; then \
1698
1698
pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
1699
1699
fi
@@ -1708,7 +1708,7 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
1708
1708
test_multiprocessing_forkserver \
1709
1709
test_mailbox test_nntplib test_socket test_poll \
1710
1710
test_select test_zipfile test_concurrent_futures
1711
- quicktest: @DEF_MAKE_RULE@ platform
1711
+ quicktest: all
1712
1712
$(TESTRUNNER) $(QUICKTESTOPTS)
1713
1713
1714
1714
# SSL tests
@@ -1719,6 +1719,10 @@ multisslcompile: all
1719
1719
multissltest: all
1720
1720
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py
1721
1721
1722
+ # All install targets use the "all" target as synchronization point to
1723
+ # prevent race conditions with PGO builds. PGO builds use recursive make,
1724
+ # which can lead to two parallel `./python setup.py build` processes that
1725
+ # step on each others toes.
1722
1726
install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKINSTALLLAST@
1723
1727
if test "x$(ENSUREPIP)" != "xno" ; then \
1724
1728
case $(ENSUREPIP) in \
@@ -1747,7 +1751,7 @@ commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
1747
1751
# Install shared libraries enabled by Setup
1748
1752
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
1749
1753
1750
- oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
1754
+ oldsharedinstall: $(DESTSHARED) all
1751
1755
@for i in X $(SHAREDMODS); do \
1752
1756
if test $$i != X; then \
1753
1757
echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
@@ -2153,7 +2157,7 @@ LIBPL= @LIBPL@
2153
2157
# pkgconfig directory
2154
2158
LIBPC= $(LIBDIR)/pkgconfig
2155
2159
2156
- libainstall: @DEF_MAKE_RULE@ python-config
2160
+ libainstall: all python-config
2157
2161
@for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \
2158
2162
do \
2159
2163
if test ! -d $(DESTDIR)$$i; then \
@@ -2207,7 +2211,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
2207
2211
2208
2212
# Install the dynamically loadable modules
2209
2213
# This goes into $(exec_prefix)
2210
- sharedinstall: sharedmods
2214
+ sharedinstall: all
2211
2215
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
2212
2216
--prefix=$(prefix) \
2213
2217
--install-scripts=$(BINDIR) \
@@ -2437,7 +2441,7 @@ distclean: clobber
2437
2441
-exec rm -f {} ';'
2438
2442
2439
2443
# Check that all symbols exported by libpython start with "Py" or "_Py"
2440
- smelly: @DEF_MAKE_RULE@
2444
+ smelly: all
2441
2445
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/smelly.py
2442
2446
2443
2447
# Find files with funny names
@@ -2472,7 +2476,7 @@ funny:
2472
2476
-o -print
2473
2477
2474
2478
# Perform some verification checks on any modified files.
2475
- patchcheck: @DEF_MAKE_RULE@
2479
+ patchcheck: all
2476
2480
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
2477
2481
2478
2482
check-limited-abi: all
0 commit comments