openssl-1.0.1-parallel-build.patch (9918B)
1 http://rt.openssl.org/Ticket/Display.html?id=2084 2 3 --- a/Makefile.org 4 +++ b/Makefile.org 5 @@ -247,17 +247,17 @@ 6 build_libs: build_crypto build_ssl build_engines 7 8 build_crypto: 9 - @dir=crypto; target=all; $(BUILD_ONE_CMD) 10 + +@dir=crypto; target=all; $(BUILD_ONE_CMD) 11 -build_ssl: 12 +build_ssl: build_crypto 13 - @dir=ssl; target=all; $(BUILD_ONE_CMD) 14 + +@dir=ssl; target=all; $(BUILD_ONE_CMD) 15 -build_engines: 16 +build_engines: build_crypto 17 - @dir=engines; target=all; $(BUILD_ONE_CMD) 18 + +@dir=engines; target=all; $(BUILD_ONE_CMD) 19 -build_apps: 20 +build_apps: build_libs 21 - @dir=apps; target=all; $(BUILD_ONE_CMD) 22 + +@dir=apps; target=all; $(BUILD_ONE_CMD) 23 -build_tests: 24 +build_tests: build_libs 25 - @dir=test; target=all; $(BUILD_ONE_CMD) 26 + +@dir=test; target=all; $(BUILD_ONE_CMD) 27 -build_tools: 28 +build_tools: build_libs 29 - @dir=tools; target=all; $(BUILD_ONE_CMD) 30 + +@dir=tools; target=all; $(BUILD_ONE_CMD) 31 32 all_testapps: build_libs build_testapps 33 build_testapps: 34 @@ -497,9 +497,9 @@ 35 dist_pem_h: 36 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) 37 38 -install: all install_docs install_sw 39 +install: install_docs install_sw 40 41 -install_sw: 42 +install_dirs: 43 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ 44 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ 45 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ 46 @@ -508,6 +508,13 @@ 47 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ 48 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ 49 $(INSTALL_PREFIX)$(OPENSSLDIR)/private 50 + @$(PERL) $(TOP)/util/mkdir-p.pl \ 51 + $(INSTALL_PREFIX)$(MANDIR)/man1 \ 52 + $(INSTALL_PREFIX)$(MANDIR)/man3 \ 53 + $(INSTALL_PREFIX)$(MANDIR)/man5 \ 54 + $(INSTALL_PREFIX)$(MANDIR)/man7 55 + 56 +install_sw: install_dirs 57 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\ 58 do \ 59 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ 60 @@ -511,7 +518,7 @@ 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 @@ -593,12 +600,7 @@ 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 @@ -105,6 +105,7 @@ LINK_SO= \ 86 SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ 87 LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ 88 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ 89 + [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \ 90 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ 91 $${SHAREDCMD} $${SHAREDFLAGS} \ 92 -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ 93 @@ -122,6 +123,7 @@ SYMLINK_SO= \ 94 done; \ 95 fi; \ 96 if [ -n "$$SHLIB_SOVER" ]; then \ 97 + [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \ 98 ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \ 99 ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \ 100 fi; \ 101 --- a/crypto/Makefile 102 +++ b/crypto/Makefile 103 @@ -85,11 +85,11 @@ 104 @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi 105 106 subdirs: 107 - @target=all; $(RECURSIVE_MAKE) 108 + +@target=all; $(RECURSIVE_MAKE) 109 110 files: 111 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 112 - @target=files; $(RECURSIVE_MAKE) 113 + +@target=files; $(RECURSIVE_MAKE) 114 115 links: 116 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) 117 @@ -100,7 +100,7 @@ 118 # lib: $(LIB): are splitted to avoid end-less loop 119 lib: $(LIB) 120 @touch lib 121 -$(LIB): $(LIBOBJ) 122 +$(LIB): $(LIBOBJ) | subdirs 123 $(AR) $(LIB) $(LIBOBJ) 124 $(RANLIB) $(LIB) || echo Never mind. 125 126 @@ -110,7 +110,7 @@ 127 fi 128 129 libs: 130 - @target=lib; $(RECURSIVE_MAKE) 131 + +@target=lib; $(RECURSIVE_MAKE) 132 133 install: 134 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... 135 @@ -119,7 +119,7 @@ 136 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ 137 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ 138 done; 139 - @target=install; $(RECURSIVE_MAKE) 140 + +@target=install; $(RECURSIVE_MAKE) 141 142 lint: 143 @target=lint; $(RECURSIVE_MAKE) 144 --- a/engines/Makefile 145 +++ b/engines/Makefile 146 @@ -72,7 +72,7 @@ 147 148 all: lib subdirs 149 150 -lib: $(LIBOBJ) 151 +lib: $(LIBOBJ) | subdirs 152 @if [ -n "$(SHARED_LIBS)" ]; then \ 153 set -e; \ 154 for l in $(LIBNAMES); do \ 155 @@ -89,7 +89,7 @@ 156 157 subdirs: 158 echo $(EDIRS) 159 - @target=all; $(RECURSIVE_MAKE) 160 + +@target=all; $(RECURSIVE_MAKE) 161 162 files: 163 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 164 @@ -128,7 +128,7 @@ 165 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \ 166 done; \ 167 fi 168 - @target=install; $(RECURSIVE_MAKE) 169 + +@target=install; $(RECURSIVE_MAKE) 170 171 tags: 172 ctags $(SRC) 173 --- a/test/Makefile 174 +++ b/test/Makefile 175 @@ -123,7 +123,7 @@ 176 tags: 177 ctags $(SRC) 178 179 -tests: exe apps $(TESTS) 180 +tests: exe $(TESTS) 181 182 apps: 183 @(cd ..; $(MAKE) DIRS=apps all) 184 @@ -365,109 +365,109 @@ 185 link_app.$${shlib_target} 186 187 $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) 188 - @target=$(RSATEST); $(BUILD_CMD) 189 + +@target=$(RSATEST); $(BUILD_CMD) 190 191 $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO) 192 - @target=$(BNTEST); $(BUILD_CMD) 193 + +@target=$(BNTEST); $(BUILD_CMD) 194 195 $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO) 196 - @target=$(ECTEST); $(BUILD_CMD) 197 + +@target=$(ECTEST); $(BUILD_CMD) 198 199 $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO) 200 - @target=$(EXPTEST); $(BUILD_CMD) 201 + +@target=$(EXPTEST); $(BUILD_CMD) 202 203 $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO) 204 - @target=$(IDEATEST); $(BUILD_CMD) 205 + +@target=$(IDEATEST); $(BUILD_CMD) 206 207 $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO) 208 - @target=$(MD2TEST); $(BUILD_CMD) 209 + +@target=$(MD2TEST); $(BUILD_CMD) 210 211 $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO) 212 - @target=$(SHATEST); $(BUILD_CMD) 213 + +@target=$(SHATEST); $(BUILD_CMD) 214 215 $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO) 216 - @target=$(SHA1TEST); $(BUILD_CMD) 217 + +@target=$(SHA1TEST); $(BUILD_CMD) 218 219 $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO) 220 - @target=$(SHA256TEST); $(BUILD_CMD) 221 + +@target=$(SHA256TEST); $(BUILD_CMD) 222 223 $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO) 224 - @target=$(SHA512TEST); $(BUILD_CMD) 225 + +@target=$(SHA512TEST); $(BUILD_CMD) 226 227 $(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO) 228 - @target=$(RMDTEST); $(BUILD_CMD) 229 + +@target=$(RMDTEST); $(BUILD_CMD) 230 231 $(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO) 232 - @target=$(MDC2TEST); $(BUILD_CMD) 233 + +@target=$(MDC2TEST); $(BUILD_CMD) 234 235 $(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO) 236 - @target=$(MD4TEST); $(BUILD_CMD) 237 + +@target=$(MD4TEST); $(BUILD_CMD) 238 239 $(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO) 240 - @target=$(MD5TEST); $(BUILD_CMD) 241 + +@target=$(MD5TEST); $(BUILD_CMD) 242 243 $(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO) 244 - @target=$(HMACTEST); $(BUILD_CMD) 245 + +@target=$(HMACTEST); $(BUILD_CMD) 246 247 $(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO) 248 - @target=$(WPTEST); $(BUILD_CMD) 249 + +@target=$(WPTEST); $(BUILD_CMD) 250 251 $(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO) 252 - @target=$(RC2TEST); $(BUILD_CMD) 253 + +@target=$(RC2TEST); $(BUILD_CMD) 254 255 $(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO) 256 - @target=$(BFTEST); $(BUILD_CMD) 257 + +@target=$(BFTEST); $(BUILD_CMD) 258 259 $(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO) 260 - @target=$(CASTTEST); $(BUILD_CMD) 261 + +@target=$(CASTTEST); $(BUILD_CMD) 262 263 $(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO) 264 - @target=$(RC4TEST); $(BUILD_CMD) 265 + +@target=$(RC4TEST); $(BUILD_CMD) 266 267 $(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO) 268 - @target=$(RC5TEST); $(BUILD_CMD) 269 + +@target=$(RC5TEST); $(BUILD_CMD) 270 271 $(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO) 272 - @target=$(DESTEST); $(BUILD_CMD) 273 + +@target=$(DESTEST); $(BUILD_CMD) 274 275 $(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO) 276 - @target=$(RANDTEST); $(BUILD_CMD) 277 + +@target=$(RANDTEST); $(BUILD_CMD) 278 279 $(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO) 280 - @target=$(DHTEST); $(BUILD_CMD) 281 + +@target=$(DHTEST); $(BUILD_CMD) 282 283 $(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO) 284 - @target=$(DSATEST); $(BUILD_CMD) 285 + +@target=$(DSATEST); $(BUILD_CMD) 286 287 $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO) 288 - @target=$(METHTEST); $(BUILD_CMD) 289 + +@target=$(METHTEST); $(BUILD_CMD) 290 291 $(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) 292 - @target=$(SSLTEST); $(FIPS_BUILD_CMD) 293 + +@target=$(SSLTEST); $(FIPS_BUILD_CMD) 294 295 $(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO) 296 - @target=$(ENGINETEST); $(BUILD_CMD) 297 + +@target=$(ENGINETEST); $(BUILD_CMD) 298 299 $(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO) 300 - @target=$(EVPTEST); $(BUILD_CMD) 301 + +@target=$(EVPTEST); $(BUILD_CMD) 302 303 $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO) 304 - @target=$(ECDSATEST); $(BUILD_CMD) 305 + +@target=$(ECDSATEST); $(BUILD_CMD) 306 307 $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO) 308 - @target=$(ECDHTEST); $(BUILD_CMD) 309 + +@target=$(ECDHTEST); $(BUILD_CMD) 310 311 $(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO) 312 - @target=$(IGETEST); $(BUILD_CMD) 313 + +@target=$(IGETEST); $(BUILD_CMD) 314 315 $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO) 316 - @target=$(JPAKETEST); $(BUILD_CMD) 317 + +@target=$(JPAKETEST); $(BUILD_CMD) 318 319 $(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO) 320 - @target=$(ASN1TEST); $(BUILD_CMD) 321 + +@target=$(ASN1TEST); $(BUILD_CMD) 322 323 $(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO) 324 - @target=$(SRPTEST); $(BUILD_CMD) 325 + +@target=$(SRPTEST); $(BUILD_CMD) 326 327 #$(AESTEST).o: $(AESTEST).c 328 # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c 329 @@ -480,7 +480,7 @@ 330 # fi 331 332 dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) 333 - @target=dummytest; $(BUILD_CMD) 334 + +@target=dummytest; $(BUILD_CMD) 335 336 # DO NOT DELETE THIS LINE -- make depend depends on it. 337