summaryrefslogtreecommitdiff
blob: 08991500a462cac591c90eb2a31ef64533f60184 (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
Fix up the parallel building. Without this fix, each instance of the NTARGETS
will try to build the libraries seperately, and on a suitably fast machine this
can lead to overwriting. Add a specific instance to build the libraries first.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Nuar mtd-utils.orig/ubi-utils/Makefile mtd-utils/ubi-utils/Makefile
--- mtd-utils.orig/ubi-utils/Makefile	2008-09-23 18:51:00.129193374 -0700
+++ mtd-utils/ubi-utils/Makefile	2008-09-23 18:54:04.097290355 -0700
@@ -34,7 +34,10 @@
 IGNORE=${wildcard .*.c.dep}
 -include ${IGNORE}
 
-$(NTARGETS):
+nlibs:
+	$(MAKE) -C new-utils libs
+
+$(NTARGETS): nlibs
 	$(MAKE) -C new-utils $@
 	mv new-utils/$@ $@
 
diff -Nuar mtd-utils.orig/ubi-utils/new-utils/Makefile mtd-utils/ubi-utils/new-utils/Makefile
--- mtd-utils.orig/ubi-utils/new-utils/Makefile	2008-09-23 18:51:00.179204851 -0700
+++ mtd-utils/ubi-utils/new-utils/Makefile	2008-09-23 18:53:32.513881545 -0700
@@ -19,6 +19,7 @@
 vpath %.c src
 
 all: $(UTILS)
+libs: $(addsuffix .a,$(LIBS))
 
 # The below cancels existing implicite rule to make programs from .c files,
 # in order to force make using our rule defined below