Hi!

With the attached patch I can build openssl in parallel. Perhaps it is
useful for someone else as well.

Cheers,

Mårten



Index: openssl-0.9.8q/Makefile.org
===================================================================
--- openssl-0.9.8q.orig/Makefile.org 2010-12-08 11:13:10.381185998 +0100
+++ openssl-0.9.8q/Makefile.org 2010-12-08 11:13:59.111185998 +0100
@@ -326,7 +326,7 @@
build_libs: build_crypto build_fips build_ssl build_shared build_engines

build_crypto:
- if [ -n "$(FIPSCANLIB)" ]; then \
+ +if [ -n "$(FIPSCANLIB)" ]; then \
EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ)
$(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
else \
@@ -334,22 +334,24 @@
fi ; export ARX ; \
dir=crypto; target=all; $(BUILD_ONE_CMD)
build_fips:
- @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
+ +...@dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(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:
@dir=crypto; target=testapps; $(BUILD_ONE_CMD)

+libcrypto.a: build_crypto
+libssl.a: build_ssl
build_shared: $(SHARED_LIBS)
libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
@if [ "$(SHLIB_TARGET)" != "" ]; then \
Index: openssl-0.9.8q/crypto/Makefile
===================================================================
--- openssl-0.9.8q.orig/crypto/Makefile 2010-12-08 11:25:54.941185997 +0100
+++ openssl-0.9.8q/crypto/Makefile 2010-12-08 11:27:54.031185995 +0100
@@ -82,17 +82,17 @@
@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 Makefile >> $(TOP)/MINFO
- @target=files; $(RECURSIVE_MAKE)
+ +...@target=files; $(RECURSIVE_MAKE)

links:
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
- @target=links; $(RECURSIVE_MAKE)
+ +...@target=links; $(RECURSIVE_MAKE)

# lib: and $(LIB): are splitted to avoid end-less loop
lib: buildinf.h $(LIB) subdirs
@@ -107,7 +107,7 @@
fi

libs:
- @target=lib; $(RECURSIVE_MAKE)
+ +...@target=lib; $(RECURSIVE_MAKE)

install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -116,10 +116,10 @@
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
- @target=install; $(RECURSIVE_MAKE)
+ +...@target=install; $(RECURSIVE_MAKE)

lint:
- @target=lint; $(RECURSIVE_MAKE)
+ +...@target=lint; $(RECURSIVE_MAKE)

depend:
@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake
buildinf.h if it does not exist
@@ -130,12 +130,12 @@

clean:
rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
- @target=clean; $(RECURSIVE_MAKE)
+ +...@target=clean; $(RECURSIVE_MAKE)

dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}'
$(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
- @target=dclean; $(RECURSIVE_MAKE)
+ +...@target=dclean; $(RECURSIVE_MAKE)

# DO NOT DELETE THIS LINE -- make depend depends on it.
Index: openssl-0.9.8q/Makefile.org
===================================================================
--- openssl-0.9.8q.orig/Makefile.org	2010-12-08 11:13:10.381185998 +0100
+++ openssl-0.9.8q/Makefile.org	2010-12-08 11:13:59.111185998 +0100
@@ -326,7 +326,7 @@
 build_libs: build_crypto build_fips build_ssl build_shared build_engines
 
 build_crypto:
-	if [ -n "$(FIPSCANLIB)" ]; then \
+	+if [ -n "$(FIPSCANLIB)" ]; then \
 		EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
 		ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
 	else \
@@ -334,22 +334,24 @@
 	fi ; export ARX ; \
 		dir=crypto; target=all; $(BUILD_ONE_CMD)
 build_fips:
-	@dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
+	+...@dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(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:
 	@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
 
+libcrypto.a: build_crypto
+libssl.a: build_ssl
 build_shared:	$(SHARED_LIBS)
 libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
 	@if [ "$(SHLIB_TARGET)" != "" ]; then \
Index: openssl-0.9.8q/crypto/Makefile
===================================================================
--- openssl-0.9.8q.orig/crypto/Makefile	2010-12-08 11:25:54.941185997 +0100
+++ openssl-0.9.8q/crypto/Makefile	2010-12-08 11:27:54.031185995 +0100
@@ -82,17 +82,17 @@
 	@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 Makefile >> $(TOP)/MINFO
-	@target=files; $(RECURSIVE_MAKE)
+	+...@target=files; $(RECURSIVE_MAKE)
 
 links:
 	@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
 	@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
 	@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
-	@target=links; $(RECURSIVE_MAKE)
+	+...@target=links; $(RECURSIVE_MAKE)
 
 # lib: and $(LIB): are splitted to avoid end-less loop
 lib:	buildinf.h $(LIB) subdirs
@@ -107,7 +107,7 @@
 	fi
 
 libs:
-	@target=lib; $(RECURSIVE_MAKE)
+	+...@target=lib; $(RECURSIVE_MAKE)
 
 install:
 	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -116,10 +116,10 @@
 	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
 	done;
-	@target=install; $(RECURSIVE_MAKE)
+	+...@target=install; $(RECURSIVE_MAKE)
 
 lint:
-	@target=lint; $(RECURSIVE_MAKE)
+	+...@target=lint; $(RECURSIVE_MAKE)
 
 depend:
 	@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
@@ -130,12 +130,12 @@
 
 clean:
 	rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
-	@target=clean; $(RECURSIVE_MAKE)
+	+...@target=clean; $(RECURSIVE_MAKE)
 
 dclean:
 	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
 	mv -f Makefile.new $(MAKEFILE)
-	@target=dclean; $(RECURSIVE_MAKE)
+	+...@target=dclean; $(RECURSIVE_MAKE)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 

Reply via email to