summaryrefslogtreecommitdiffstats
path: root/patches/openssl-1.0.2h/0101-fix-parallel-building.patch
blob: 80ee249df998660b23ae681d67150a2a2d056b26 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Mon, 23 Mar 2015 09:29:05 +0100
Subject: [PATCH] fix parallel building

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 Makefile.org     | 18 ++++++++++++------
 crypto/Makefile  |  4 ++--
 engines/Makefile |  4 ++--
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/Makefile.org b/Makefile.org
index 9aee32001139..fc86c73c76f0 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -278,18 +278,24 @@ build_libs: build_libcrypto build_libssl openssl.pc
 build_libcrypto: build_crypto build_engines libcrypto.pc
 build_libssl: build_ssl libssl.pc
 
+ifeq ($(SHARED_LIBS),)
+build_ssl: build_engines
+else
+build_engines: build_ssl
+endif
+
 build_crypto:
-	@dir=crypto; target=all; $(BUILD_ONE_CMD)
+	@+dir=crypto; target=all; $(BUILD_ONE_CMD)
 build_ssl: build_crypto
-	@dir=ssl; target=all; $(BUILD_ONE_CMD)
+	@+dir=ssl; target=all; $(BUILD_ONE_CMD)
 build_engines: build_crypto
-	@dir=engines; target=all; $(BUILD_ONE_CMD)
+	@+dir=engines; target=all; $(BUILD_ONE_CMD)
 build_apps: build_libs
-	@dir=apps; target=all; $(BUILD_ONE_CMD)
+	@+dir=apps; target=all; $(BUILD_ONE_CMD)
 build_tests: build_libs
-	@dir=test; target=all; $(BUILD_ONE_CMD)
+	@+dir=test; target=all; $(BUILD_ONE_CMD)
 build_tools: build_libs
-	@dir=tools; target=all; $(BUILD_ONE_CMD)
+	@+dir=tools; target=all; $(BUILD_ONE_CMD)
 
 all_testapps: build_libs build_testapps
 build_testapps:
diff --git a/crypto/Makefile b/crypto/Makefile
index 7869996a9c07..76690a1c8619 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -85,7 +85,7 @@ testapps:
 	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
 
 subdirs:
-	@target=all; $(RECURSIVE_MAKE)
+	@+target=all; $(RECURSIVE_MAKE)
 
 files:
 	$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
@@ -100,7 +100,7 @@ links:
 # lib: $(LIB): are splitted to avoid end-less loop
 lib:	$(LIB)
 	@touch lib
-$(LIB):	$(LIBOBJ)
+$(LIB):	$(LIBOBJ) subdirs
 	$(AR) $(LIB) $(LIBOBJ)
 	test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
 	$(RANLIB) $(LIB) || echo Never mind.
diff --git a/engines/Makefile b/engines/Makefile
index df7def6174fd..ec27bc24be64 100644
--- a/engines/Makefile
+++ b/engines/Makefile
@@ -72,7 +72,7 @@ top:
 
 all:	lib subdirs
 
-lib:	$(LIBOBJ)
+lib:	$(LIBOBJ) subdirs
 	@if [ -n "$(SHARED_LIBS)" ]; then \
 		set -e; \
 		for l in $(LIBNAMES); do \
@@ -89,7 +89,7 @@ lib:	$(LIBOBJ)
 
 subdirs:
 	echo $(EDIRS)
-	@target=all; $(RECURSIVE_MAKE)
+	@+target=all; $(RECURSIVE_MAKE)
 
 files:
 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO