From: Robert Schwebel Date: Sun, 30 Oct 2011 22:33:40 +0100 Subject: [PATCH] fix parallel build The build system has a race with the creation of the python bindings; if both targets of the "gpspacket.so gpslib.so:" rule are started at the same time, the build "sometimes" breaks; this can be triggered with only a few cycles when built with -j16 on a 8-way box. Signed-off-by: Robert Schwebel --- Makefile.am | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 05e31f0..818c57a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -187,12 +187,17 @@ if HAVE_PYTHON PYEXTENSIONS = gpspacket.so gpslib.so noinst_SCRIPTS = gpspacket.so gpslib.so setup.py -gpspacket.so gpslib.so: gpspacket.c gpslib.c libgps.la +.PHONY: build_python_ext +build_python_ext: gpspacket.c gpslib.c libgps.la (pwd="`pwd`"; cd $(srcdir) && $(PYTHON) setup.py build_ext --build-lib "$$pwd" --build-temp "$$pwd/build" --include-dirs "$$pwd") -endif + +gpspacket.so: build_python_ext +gpslib.so: build_python_ext + # Clean up after Python clean-local: rm -rf build +endif # # Build test_gpsmm