f2acc4a27bce0a0b4f3c7a73f937d98b1e399c7a
[openwrt/openwrt.git] / package / libs / openssl / patches / 200-parallel_build.patch
1 --- a/Makefile.org
2 +++ b/Makefile.org
3 @@ -282,17 +282,17 @@ build_libcrypto: build_crypto build_engi
4 build_libssl: build_ssl libssl.pc
5
6 build_crypto:
7 - @dir=crypto; target=all; $(BUILD_ONE_CMD)
8 + +@dir=crypto; target=all; $(BUILD_ONE_CMD)
9 build_ssl: build_crypto
10 - @dir=ssl; target=all; $(BUILD_ONE_CMD)
11 + +@dir=ssl; target=all; $(BUILD_ONE_CMD)
12 build_engines: build_crypto
13 - @dir=engines; target=all; $(BUILD_ONE_CMD)
14 + +@dir=engines; target=all; $(BUILD_ONE_CMD)
15 build_apps: build_libs
16 - @dir=apps; target=all; $(BUILD_ONE_CMD)
17 + +@dir=apps; target=all; $(BUILD_ONE_CMD)
18 build_tests: build_libs
19 - @dir=test; target=all; $(BUILD_ONE_CMD)
20 + +@dir=test; target=all; $(BUILD_ONE_CMD)
21 build_tools: build_libs
22 - @dir=tools; target=all; $(BUILD_ONE_CMD)
23 + +@dir=tools; target=all; $(BUILD_ONE_CMD)
24
25 all_testapps: build_libs build_testapps
26 build_testapps:
27 @@ -473,7 +473,7 @@ update: errors stacks util/libeay.num ut
28 @set -e; target=update; $(RECURSIVE_BUILD_CMD)
29
30 depend:
31 - @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
32 + +@set -e; target=depend; $(RECURSIVE_BUILD_CMD)
33
34 lint:
35 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
36 @@ -535,9 +535,9 @@ dist:
37 @$(MAKE) SDIRS='$(SDIRS)' clean
38 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
39
40 -install: all install_sw
41 +install: install_sw
42
43 -install_sw:
44 +install_dirs:
45 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
46 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
47 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
48 @@ -546,12 +546,19 @@ install_sw:
49 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
50 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
51 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
52 + @$(PERL) $(TOP)/util/mkdir-p.pl \
53 + $(INSTALL_PREFIX)$(MANDIR)/man1 \
54 + $(INSTALL_PREFIX)$(MANDIR)/man3 \
55 + $(INSTALL_PREFIX)$(MANDIR)/man5 \
56 + $(INSTALL_PREFIX)$(MANDIR)/man7
57 +
58 +install_sw: install_dirs
59 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64 - @set -e; target=install; $(RECURSIVE_BUILD_CMD)
65 + +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
66 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
67 do \
68 if [ -f "$$i" ]; then \
69 @@ -635,12 +642,7 @@ install_html_docs:
70 done; \
71 done
72
73 -install_docs:
74 - @$(PERL) $(TOP)/util/mkdir-p.pl \
75 - $(INSTALL_PREFIX)$(MANDIR)/man1 \
76 - $(INSTALL_PREFIX)$(MANDIR)/man3 \
77 - $(INSTALL_PREFIX)$(MANDIR)/man5 \
78 - $(INSTALL_PREFIX)$(MANDIR)/man7
79 +install_docs: install_dirs
80 @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
81 here="`pwd`"; \
82 filecase=; \
83 --- a/Makefile.shared
84 +++ b/Makefile.shared
85 @@ -120,6 +120,7 @@ SYMLINK_SO= \
86 done; \
87 fi; \
88 if [ -n "$$SHLIB_SOVER" ]; then \
89 + [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
90 ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
91 ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
92 fi; \
93 --- a/crypto/Makefile
94 +++ b/crypto/Makefile
95 @@ -85,11 +85,11 @@ testapps:
96 @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
97
98 subdirs:
99 - @target=all; $(RECURSIVE_MAKE)
100 + +@target=all; $(RECURSIVE_MAKE)
101
102 files:
103 $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
104 - @target=files; $(RECURSIVE_MAKE)
105 + +@target=files; $(RECURSIVE_MAKE)
106
107 links:
108 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
109 @@ -100,7 +100,7 @@ links:
110 # lib: $(LIB): are splitted to avoid end-less loop
111 lib: $(LIB)
112 @touch lib
113 -$(LIB): $(LIBOBJ)
114 +$(LIB): $(LIBOBJ) | subdirs
115 $(AR) $(LIB) $(LIBOBJ)
116 test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
117 $(RANLIB) $(LIB) || echo Never mind.
118 @@ -111,7 +111,7 @@ shared: buildinf.h lib subdirs
119 fi
120
121 libs:
122 - @target=lib; $(RECURSIVE_MAKE)
123 + +@target=lib; $(RECURSIVE_MAKE)
124
125 install:
126 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
127 @@ -120,7 +120,7 @@ install:
128 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
129 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
130 done;
131 - @target=install; $(RECURSIVE_MAKE)
132 + +@target=install; $(RECURSIVE_MAKE)
133
134 lint:
135 @target=lint; $(RECURSIVE_MAKE)
136 --- a/engines/Makefile
137 +++ b/engines/Makefile
138 @@ -72,7 +72,7 @@ top:
139
140 all: lib subdirs
141
142 -lib: $(LIBOBJ)
143 +lib: $(LIBOBJ) | subdirs
144 @if [ -n "$(SHARED_LIBS)" ]; then \
145 set -e; \
146 for l in $(LIBNAMES); do \
147 @@ -89,7 +89,7 @@ lib: $(LIBOBJ)
148
149 subdirs:
150 echo $(EDIRS)
151 - @target=all; $(RECURSIVE_MAKE)
152 + +@target=all; $(RECURSIVE_MAKE)
153
154 files:
155 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
156 @@ -128,7 +128,7 @@ install:
157 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
158 done; \
159 fi
160 - @target=install; $(RECURSIVE_MAKE)
161 + +@target=install; $(RECURSIVE_MAKE)
162
163 tags:
164 ctags $(SRC)
165 --- a/test/Makefile
166 +++ b/test/Makefile
167 @@ -144,7 +144,7 @@ install:
168 tags:
169 ctags $(SRC)
170
171 -tests: exe apps $(TESTS)
172 +tests: exe $(TESTS)
173
174 apps:
175 @(cd ..; $(MAKE) DIRS=apps all)
176 @@ -578,7 +578,7 @@ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssl
177 # fi
178
179 dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
180 - @target=dummytest; $(BUILD_CMD)
181 + +@target=dummytest; $(BUILD_CMD)
182
183 # DO NOT DELETE THIS LINE -- make depend depends on it.
184