Yes, it is a GNU Make feature as far as I know. The + tells make that
the rule is recursive and thus propagates the -j magic to sub makes.
Normally it handles this magic automatically but for this to work you
have to call sub makes with $(MAKE), if you use anything else you
manually have to mark the recipe with a +. See section 5.7.1 in
http://www.gnu.org/software/make/manual/make.html#MAKE-Variable

Cheers,

Mårten

2010/12/8 Richard Levitte <[email protected]>:
> Hmmm, I'm not aware of the meaning of a '+' at the start of command
> lines, never seen it before.  I can't see any explanation in the GNU
> make manual, so I assume it's another implementation of make that
> supports this.
>
> Please enlighten me.
>
> Cheers,
> Richard
>
> In message <[email protected]> on 
> Wed, 8 Dec 2010 13:01:48 +0100, Mårten Wikström 
> <[email protected]> said:
>
> marten.wikstrom> Hi!
> marten.wikstrom>
> marten.wikstrom> With the attached patch I can build openssl in parallel. 
> Perhaps it is
> marten.wikstrom> useful for someone else as well.
> marten.wikstrom>
> marten.wikstrom> Cheers,
> marten.wikstrom>
> marten.wikstrom> Mårten
> marten.wikstrom>
> marten.wikstrom>
> marten.wikstrom>
> marten.wikstrom> Index: openssl-0.9.8q/Makefile.org
> marten.wikstrom> 
> ===================================================================
> marten.wikstrom> --- openssl-0.9.8q.orig/Makefile.org 2010-12-08 
> 11:13:10.381185998 +0100
> marten.wikstrom> +++ openssl-0.9.8q/Makefile.org 2010-12-08 
> 11:13:59.111185998 +0100
> marten.wikstrom> @@ -326,7 +326,7 @@
> marten.wikstrom> build_libs: build_crypto build_fips build_ssl build_shared 
> build_engines
> marten.wikstrom>
> marten.wikstrom> build_crypto:
> marten.wikstrom> - if [ -n "$(FIPSCANLIB)" ]; then \
> marten.wikstrom> + +if [ -n "$(FIPSCANLIB)" ]; then \
> marten.wikstrom> EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ)
> marten.wikstrom> $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
> marten.wikstrom> ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
> marten.wikstrom> else \
> marten.wikstrom> @@ -334,22 +334,24 @@
> marten.wikstrom> fi ; export ARX ; \
> marten.wikstrom> dir=crypto; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> build_fips:
> marten.wikstrom> - @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || 
> $(BUILD_ONE_CMD)
> marten.wikstrom> + +...@dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || 
> $(BUILD_ONE_CMD)
> marten.wikstrom> build_ssl: build_crypto
> marten.wikstrom> - @dir=ssl; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> + +...@dir=ssl; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> build_engines: build_crypto
> marten.wikstrom> - @dir=engines; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> + +...@dir=engines; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> build_apps: build_libs
> marten.wikstrom> - @dir=apps; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> + +...@dir=apps; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> build_tests: build_libs
> marten.wikstrom> - @dir=test; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> + +...@dir=test; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> build_tools: build_libs
> marten.wikstrom> - @dir=tools; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom> + +...@dir=tools; target=all; $(BUILD_ONE_CMD)
> marten.wikstrom>
> marten.wikstrom> all_testapps: build_libs build_testapps
> marten.wikstrom> build_testapps:
> marten.wikstrom> @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
> marten.wikstrom>
> marten.wikstrom> +libcrypto.a: build_crypto
> marten.wikstrom> +libssl.a: build_ssl
> marten.wikstrom> build_shared: $(SHARED_LIBS)
> marten.wikstrom> libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
> marten.wikstrom> @if [ "$(SHLIB_TARGET)" != "" ]; then \
> marten.wikstrom> Index: openssl-0.9.8q/crypto/Makefile
> marten.wikstrom> 
> ===================================================================
> marten.wikstrom> --- openssl-0.9.8q.orig/crypto/Makefile 2010-12-08 
> 11:25:54.941185997 +0100
> marten.wikstrom> +++ openssl-0.9.8q/crypto/Makefile 2010-12-08 
> 11:27:54.031185995 +0100
> marten.wikstrom> @@ -82,17 +82,17 @@
> marten.wikstrom> @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile 
> reflect THIS=$@; fi
> marten.wikstrom>
> marten.wikstrom> subdirs:
> marten.wikstrom> - @target=all; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=all; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> files:
> marten.wikstrom> $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
> marten.wikstrom> - @target=files; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=files; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> links:
> marten.wikstrom> @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
> marten.wikstrom> @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
> marten.wikstrom> @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
> marten.wikstrom> - @target=links; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=links; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> # lib: and $(LIB): are splitted to avoid end-less loop
> marten.wikstrom> lib: buildinf.h $(LIB) subdirs
> marten.wikstrom> @@ -107,7 +107,7 @@
> marten.wikstrom> fi
> marten.wikstrom>
> marten.wikstrom> libs:
> marten.wikstrom> - @target=lib; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=lib; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> install:
> marten.wikstrom> @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
> marten.wikstrom> @@ -116,10 +116,10 @@
> marten.wikstrom> (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
> marten.wikstrom> chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i 
> ); \
> marten.wikstrom> done;
> marten.wikstrom> - @target=install; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=install; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> lint:
> marten.wikstrom> - @target=lint; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=lint; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> depend:
> marten.wikstrom> @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake
> marten.wikstrom> buildinf.h if it does not exist
> marten.wikstrom> @@ -130,12 +130,12 @@
> marten.wikstrom>
> marten.wikstrom> clean:
> marten.wikstrom> rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure 
> .nfs* *.old *.bak fluff
> marten.wikstrom> - @target=clean; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=clean; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> dclean:
> marten.wikstrom> $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; 
> exit(0);}'
> marten.wikstrom> $(MAKEFILE) >Makefile.new
> marten.wikstrom> mv -f Makefile.new $(MAKEFILE)
> marten.wikstrom> - @target=dclean; $(RECURSIVE_MAKE)
> marten.wikstrom> + +...@target=dclean; $(RECURSIVE_MAKE)
> marten.wikstrom>
> marten.wikstrom> # DO NOT DELETE THIS LINE -- make depend depends on it.
>
> --
> Richard Levitte                         [email protected]
>                                        http://richard.levitte.org/
>
> "Life is a tremendous celebration - and I'm invited!"
> -- from a friend's blog, translated from Swedish
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to