blob: 02d74251dbfd26068c4d4e440840465ed579496a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
From: Robert Schwebel <r.schwebel@pengutronix.de>
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 <r.schwebel@pengutronix.de>
---
Makefile.am | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: gpsd-2.39/Makefile.am
===================================================================
--- gpsd-2.39.orig/Makefile.am
+++ gpsd-2.39/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
|