Jumbo Makfiles update.
authorAndy Polyakov <appro@openssl.org>
Thu, 23 Jun 2005 00:03:26 +0000 (00:03 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 23 Jun 2005 00:03:26 +0000 (00:03 +0000)
- eliminate ambiguities between GNU-ish and SysV-ish make flavors;
- switch [back] to -e;
- fold/unify rules;

This is follow-up to the patch introducing common BUILDENV. Idea is
to collect as much parameters in $(TOP) as possible and "strip" lower
Makefiles for most variables [and thus makes them more readable].

Makefile.org
apps/Makefile
crypto/Makefile
crypto/bio/Makefile
engines/Makefile
test/Makefile

index 4d23560062d60c900a8db1ce2f5036bea55702ee..b78a82ec9309849dc0c90ba6dc95f7d2837b4981 100644 (file)
@@ -112,6 +112,8 @@ SDIRS=  \
        buffer bio stack lhash rand err \
        evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
        store pqueue
+# keep in mind that the above list is adjusted by ./Configure
+# according to no-xxx arguments...
 
 # tests to perform.  "alltests" is a special word indicating that all tests
 # should be performed.
@@ -146,17 +148,30 @@ HEADER=         e_os.h
 
 all: Makefile build_all openssl.pc
 
+# as we stick to -e, CLEARENV ensures that local variables in lower
+# Makefiles remain local and variable. $${var+var} is tribute to Korn
+# shell, which [annoyingly enough] terminates unset with error if var
+# is not set:-(
+CLEARENV=      unset $${TOP+TOP} $${LIB+LIB} $${LIBS+LIBS}     \
+               $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES}       \
+               $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC}           \
+               $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
+               $${EXHEADER+EXHEADER} $${HEADER+HEADER}         \
+               $${GENERAL+GENERAL} $${CFLAGS+CFLAGS}           \
+               $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS}           \
+               $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
+
 BUILDENV=      PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
                CC='${CC}' CFLAG='${CFLAG}'                     \
                AS='${CC}' ASFLAG='${CFLAG} -c'                 \
                AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'    \
-               SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/lib'   \
+               SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib'   \
                INSTALL_PREFIX='${INSTALL_PREFIX}'              \
                INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'   \
-               MAKEDEPEND='$$(TOP)/util/domd $$(TOP) -MD $(MAKEDEPPROG)' \
+               MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
                DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}'    \
                MAKEDEPPROG='${MAKEDEPPROG}'                    \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
+               LDFLAGS='${LDFLAGS}' SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
                KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}'   \
                EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}'       \
                SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
@@ -169,18 +184,19 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
                SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'                  \
                MD5_ASM_OBJ='${MD5_ASM_OBJ}'                    \
                RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'              \
-               THIS=$${THIS:-$@}
+               THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
+# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
+# which in turn eliminates ambiguities in variable treatment with -e.
 
-BUILD_CMD=if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
-       if [ -d "$$dir" ]; then \
-               (cd $$dir && echo "making $$target in $$dir..." && \
-               $(MAKE) $(BUILDENV) $$target ) || exit 1; \
-       else \
-               $(MAKE) $$dir; \
-       fi; fi
+BUILD_CMD=  if [ -d "$$dir" ]; then \
+           (   cd $$dir && echo "making $$target in $$dir..." && \
+               $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
+           ) || exit 1; \
+           fi
+RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
 
 reflect:
-       @[ -n "$(THIS)" ] && $(MAKE) $(THIS) $(BUILDENV)
+       @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
 
 sub_all: build_all
 build_all: build_libs build_apps build_tests build_tools
@@ -250,7 +266,7 @@ do_$(SHLIB_TARGET):
                if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
                        libs="$(LIBKRB5) $$libs"; \
                fi; \
-               $(MAKE) -f Makefile.shared $(BUILDENV) \
+               $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
                        LIBDEPS="$$libs $(EX_LIBS)" \
@@ -281,14 +297,8 @@ libclean:
 
 clean: libclean
        rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
-       @set -e; for i in $(DIRS) ;\
-       do \
-       if [ -d "$$i" ]; then \
-               (cd $$i && echo "making clean in $$i..." && \
-               $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
-               rm -f $(LIBS); \
-       fi; \
-       done;
+       @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
+       rm -f $(LIBS)
        rm -f openssl.pc
        rm -f speed.* .pure
        rm -f $(TARFILE)
@@ -303,32 +313,20 @@ makefile.one: files
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
-       @set -e; for i in $(DIRS) ;\
-       do \
-       if [ -d "$$i" ]; then \
-               (cd $$i && echo "making 'files' in $$i..." && \
-               $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
-       fi; \
-       done;
+       @set -e; target=files; $(RECURSIVE_BUILD_CMD)
 
 links:
        @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
        @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
-       @set -e; target=links; for dir in $(DIRS); do $(BUILD_CMD); done
+       @set -e; target=links; $(RECURSIVE_BUILD_CMD)
 
 gentests:
        @(cd test && echo "generating dummy tests (if needed)..." && \
-       $(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
+       $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
 
 dclean:
        rm -f *.bak
-       @set -e; for i in $(DIRS) ;\
-       do \
-       if [ -d "$$i" ]; then \
-               (cd $$i && echo "making dclean in $$i..." && \
-               $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
-       fi; \
-       done;
+       @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
 
 rehash: rehash.time
 rehash.time: certs
@@ -342,29 +340,17 @@ test:   tests
 
 tests: rehash
        @(cd test && echo "testing..." && \
-       $(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
+       $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
        util/opensslwrap.sh version -a
 
 report:
        @$(PERL) util/selftest.pl
 
 depend:
-       @set -e; for i in $(DIRS) ;\
-       do \
-       if [ -d "$$i" ]; then \
-               (cd $$i && echo "making dependencies $$i..." && \
-               $(MAKE) $(BUILDENV) depend ) || exit 1; \
-       fi; \
-       done;
+       @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
 
 lint:
-       @set -e; for i in $(DIRS) ;\
-       do \
-       if [ -d "$$i" ]; then \
-               (cd $$i && echo "making lint $$i..." && \
-               $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
-       fi; \
-       done;
+       @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
 
 tags:
        rm -f TAGS
@@ -435,7 +421,7 @@ dist:
        @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
 
 dist_pem_h:
-       (cd crypto/pem; $(MAKE) $(BUILDENV) pem.h; $(MAKE) clean)
+       (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
 
 install: all install_docs install_sw
 
@@ -453,13 +439,7 @@ install_sw:
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
        done;
-       @set -e; for i in $(DIRS) ;\
-       do \
-       if [ -d "$$i" ]; then \
-               (cd $$i; echo "installing $$i..."; \
-               $(MAKE) $(BUILDENV) install ); \
-       fi; \
-       done
+       @set -e; target=install; $(RECURSIVE_BUILD_CMD)
        @set -e; for i in $(LIBS) ;\
        do \
                if [ -f "$$i" ]; then \
index a47793b5abe01b9622b51cba3196fd95806f7dd1..4bd2646520ef6dddc9867e770bdae9d04c84f402 100644 (file)
@@ -86,7 +86,7 @@ req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
        shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
                shlib_target="$(SHLIB_TARGET)"; \
        fi; \
-       $(MAKE) -f $(TOP)/Makefile.shared \
+       $(MAKE) -f $(TOP)/Makefile.shared -e \
                APPNAME=req OBJECTS="sreq.o $(A_OBJ) $(RAND_OBJ)" \
                LIBDEPS="$(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)" \
                link_app.$${shlib_target}
@@ -158,7 +158,7 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        else \
          LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
        fi; \
-       $(MAKE) -f $(TOP)/Makefile.shared \
+       $(MAKE) -f $(TOP)/Makefile.shared -e \
                APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
                LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
                link_app.$${shlib_target}
@@ -621,25 +621,24 @@ rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
 rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
 rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
 rand.o: ../include/openssl/x509_vfy.h apps.h rand.c
-req.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
-req.o: ../include/openssl/bio.h ../include/openssl/bn.h
-req.o: ../include/openssl/buffer.h ../include/openssl/conf.h
-req.o: ../include/openssl/crypto.h ../include/openssl/dh.h
-req.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-req.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-req.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-req.o: ../include/openssl/err.h ../include/openssl/evp.h
-req.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-req.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-req.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-req.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-req.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-req.o: ../include/openssl/sha.h ../include/openssl/stack.h
-req.o: ../include/openssl/store.h ../include/openssl/symhacks.h
-req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
-req.o: ../include/openssl/x509v3.h apps.h req.c
+req.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
+req.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+req.o: ../include/openssl/conf.h ../include/openssl/crypto.h
+req.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+req.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+req.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+req.o: ../include/openssl/engine.h ../include/openssl/err.h
+req.o: ../include/openssl/evp.h ../include/openssl/lhash.h
+req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
+req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
+req.o: ../include/openssl/rand.h ../include/openssl/rsa.h
+req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+req.o: ../include/openssl/stack.h ../include/openssl/store.h
+req.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
+req.o: ../include/openssl/ui.h ../include/openssl/x509.h
+req.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h req.c
 rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
 rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
 rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
index 1322b72a39b365f5212e833e48e20e24cddc7f0d..879e593d89c54abe1ad4845e0462602508edd477 100644 (file)
@@ -15,6 +15,11 @@ MAKEFILE=       Makefile
 RM=             rm -f
 AR=            ar r
 
+RECURSIVE_MAKE=        [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
+                   (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
+                   $(MAKE) -e TOP=../.. DIR=$$i INCLUDES='${INCLUDES}' $$target ) || exit 1; \
+               done;
+
 PEX_LIBS=
 EX_LIBS=
  
@@ -24,14 +29,6 @@ AFLAGS=$(ASFLAGS)
 
 LIBS=
 
-SDIRS= objects \
-       md2 md4 md5 sha mdc2 hmac ripemd \
-       des rc2 rc4 rc5 idea bf cast \
-       bn ec rsa dsa ecdsa ecdh dh dso engine aes \
-       buffer bio stack lhash rand err \
-       evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
-       store pqueue
-
 GENERAL=Makefile README crypto-lib.com install.com
 
 LIB= $(TOP)/libcrypto.a
@@ -52,30 +49,6 @@ top:
 
 all: shared
 
-BUILDENV=      PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
-               CC='${CC}' CFLAG='${CFLAG}'                     \
-               AS='${CC}' ASFLAG='${CFLAG} -c'                 \
-               AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'    \
-               SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/lib'           \
-               INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'   \
-               MAKEDEPEND='$$(TOP)/util/domd $$(TOP) -MD $(MAKEDEPPROG)'\
-               DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}'    \
-               MAKEDEPPROG='${MAKEDEPPROG}'                    \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}'   \
-               EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}'       \
-               SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
-               PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}'     \
-               CPUID_OBJ='${CPUID_OBJ}'                        \
-               BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}'         \
-               AES_ASM_OBJ='${AES_ASM_OBJ}'                    \
-               BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}'       \
-               RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}'       \
-               SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'                  \
-               MD5_ASM_OBJ='${MD5_ASM_OBJ}'                    \
-               RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'              \
-               THIS=$${THIS:-$@}
-
 buildinf.h: ../Makefile
        ( echo "#ifndef MK1MF_BUILD"; \
        echo '  /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
@@ -103,34 +76,23 @@ ia64cpuid.s: ia64cpuid.S
        $(CC) $(CFLAGS) -E ia64cpuid.S > $@
 
 testapps:
-       [ -z "$(THIS)" ] || ( if echo ${SDIRS} | fgrep ' des '; \
-       then cd des && $(MAKE) des; fi )
-       [ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) testapps );
+       [ -z "$(THIS)" ] || (   if echo ${SDIRS} | fgrep ' des '; \
+                               then cd des && $(MAKE) -e des; fi )
+       [ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) -e testapps );
        @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
 
 subdirs:
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making all in crypto/$$i..." && \
-       $(MAKE) $(BUILDENV) INCLUDES='${INCLUDES}' all ) || exit 1; \
-       done;
+       @target=all; $(RECURSIVE_MAKE)
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making 'files' in crypto/$$i..." && \
-       $(MAKE) files ); \
-       done;
+       @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)
-       @for i in $(SDIRS); do \
-           (cd $$i && echo "making links in crypto/$$i..." && \
-           $(MAKE) links ); \
-       done;
+       @target=links; $(RECURSIVE_MAKE)
 
 lib:   $(LIBOBJ)
        $(AR) $(LIB) $(LIBOBJ)
@@ -143,19 +105,7 @@ shared: buildinf.h lib subdirs
        fi
 
 libs:
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making libs in crypto/$$i..." && \
-       $(MAKE) lib );
-       done;
-
-tests:
-       @[ -z "$(THIS)" ] || (for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making tests in crypto/$$i..." && \
-       $(MAKE) tests ); \
-       done; )
-       @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
+       @target=lib; $(RECURSIVE_MAKE)
 
 install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -164,47 +114,26 @@ install:
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
        done;
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making install in crypto/$$i..." && \
-       $(MAKE) install ); \
-       done;
+       @target=install; $(RECURSIVE_MAKE)
 
 lint:
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making lint in crypto/$$i..." && \
-       $(MAKE) lint ); \
-       done;
+       @target=lint; $(RECURSIVE_MAKE)
 
 depend:
-       [ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
-       [ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
-       [ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
-       @[ -z "$(THIS)" ] || (set -e; \
-       for i in $(SDIRS) ; do \
-           (   cd $$i && echo "making depend in crypto/$$i..." && \
-               $(MAKE) INCLUDES='${INCLUDES}' depend \
-           ); \
-       done; )
+       @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
+       @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
+       @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
+       @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
        @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
 
 clean:
        rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making clean in crypto/$$i..." && \
-       $(MAKE) clean ); \
-       done;
+       @target=clean; $(RECURSIVE_MAKE)
 
 dclean:
        $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
        mv -f Makefile.new $(MAKEFILE)
-       @for i in $(SDIRS) ;\
-       do \
-       (cd $$i && echo "making dclean in crypto/$$i..." && \
-       $(MAKE) dclean ); \
-       done;
+       @target=dclean; $(RECURSIVE_MAKE)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
index 1522147036291e82cdafd2db66d0ccf08b850b3a..fdbce02f86c0f25ecdc5cbae5aeeec5f53956ab9 100644 (file)
@@ -92,7 +92,7 @@ b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
 b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 b_dump.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-b_dump.o: ../../include/openssl/symhacks.h ../cryptlib.h b_dump.c
+b_dump.o: ../../include/openssl/symhacks.h ../cryptlib.h b_dump.c bio_lcl.h
 b_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
 b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@@ -183,14 +183,14 @@ bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
 bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 bss_fd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-bss_fd.o: ../../include/openssl/symhacks.h ../cryptlib.h bss_fd.c
+bss_fd.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_lcl.h bss_fd.c
 bss_file.o: ../../e_os.h ../../include/openssl/bio.h
 bss_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
 bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
 bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 bss_file.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-bss_file.o: ../../include/openssl/symhacks.h ../cryptlib.h bss_file.c
+bss_file.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_lcl.h bss_file.c
 bss_log.o: ../../e_os.h ../../include/openssl/bio.h
 bss_log.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
index bb338258de6ec779a1da5220edff7ad21b59709b..b8fb1e9a0a386babd89299fa83e45192281f0aac 100644 (file)
@@ -65,7 +65,7 @@ lib:  $(LIBOBJ)
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                for l in $(LIBNAMES); do \
-                       $(MAKE) -f ../Makefile.shared \
+                       $(MAKE) -f ../Makefile.shared -e \
                                LIBNAME=$$l LIBEXTRAS=e_$$l.o \
                                LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
                                link_o.$(SHLIB_TARGET); \
@@ -168,6 +168,23 @@ e_atalla.o: ../include/openssl/ossl_typ.h ../include/openssl/rsa.h
 e_atalla.o: ../include/openssl/safestack.h ../include/openssl/stack.h
 e_atalla.o: ../include/openssl/symhacks.h e_atalla.c e_atalla_err.c
 e_atalla.o: e_atalla_err.h vendor_defns/atalla.h
+e_chil.o: ../include/openssl/asn1.h ../include/openssl/bio.h
+e_chil.o: ../include/openssl/bn.h ../include/openssl/buffer.h
+e_chil.o: ../include/openssl/crypto.h ../include/openssl/dh.h
+e_chil.o: ../include/openssl/dso.h ../include/openssl/e_os2.h
+e_chil.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
+e_chil.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
+e_chil.o: ../include/openssl/err.h ../include/openssl/evp.h
+e_chil.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
+e_chil.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+e_chil.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+e_chil.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+e_chil.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+e_chil.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+e_chil.o: ../include/openssl/sha.h ../include/openssl/stack.h
+e_chil.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
+e_chil.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_chil.c
+e_chil.o: e_chil_err.c e_chil_err.h vendor_defns/hwcryptohook.h
 e_cswift.o: ../include/openssl/asn1.h ../include/openssl/bio.h
 e_cswift.o: ../include/openssl/bn.h ../include/openssl/buffer.h
 e_cswift.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -184,24 +201,6 @@ e_gmp.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
 e_gmp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 e_gmp.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
 e_gmp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h e_gmp.c
-e_chil.o: ../include/openssl/asn1.h ../include/openssl/bio.h
-e_chil.o: ../include/openssl/bn.h ../include/openssl/buffer.h
-e_chil.o: ../include/openssl/crypto.h ../include/openssl/dh.h
-e_chil.o: ../include/openssl/dso.h ../include/openssl/e_os2.h
-e_chil.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-e_chil.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-e_chil.o: ../include/openssl/err.h ../include/openssl/evp.h
-e_chil.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
-e_chil.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-e_chil.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-e_chil.o: ../include/openssl/pem.h ../include/openssl/pem2.h
-e_chil.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-e_chil.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-e_chil.o: ../include/openssl/sha.h ../include/openssl/stack.h
-e_chil.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
-e_chil.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
-e_chil.o: e_chil.c e_chil_err.c e_chil_err.h
-e_chil.o: vendor_defns/hwcryptohook.h
 e_nuron.o: ../include/openssl/asn1.h ../include/openssl/bio.h
 e_nuron.o: ../include/openssl/bn.h ../include/openssl/buffer.h
 e_nuron.o: ../include/openssl/crypto.h ../include/openssl/dh.h
index b6575dda12a2e730ee8d81b0dd596c7e2a01f9c0..09f3787064b0ef243718bf45db1bb6ef97faf5d2 100644 (file)
@@ -312,7 +312,7 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
        else \
                LIBRARIES="$(LIBSSL) $(LIBCRYPTO)"; \
        fi; \
-       $(MAKE) -f $(TOP)/Makefile.shared \
+       $(MAKE) -f $(TOP)/Makefile.shared -e \
                APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
                LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
                link_app.$${shlib_target}
@@ -549,8 +549,11 @@ md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
 md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
 md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
 md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md5test.c
-mdc2test.o: ../e_os.h ../include/openssl/e_os2.h
-mdc2test.o: ../include/openssl/opensslconf.h mdc2test.c
+mdc2test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
+mdc2test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
+mdc2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+mdc2test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+mdc2test.o: ../include/openssl/symhacks.h mdc2test.c
 randtest.o: ../e_os.h ../include/openssl/e_os2.h
 randtest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
 randtest.o: ../include/openssl/rand.h randtest.c
@@ -559,8 +562,11 @@ rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c
 rc4test.o: ../e_os.h ../include/openssl/e_os2.h
 rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h
 rc4test.o: ../include/openssl/sha.h rc4test.c
-rc5test.o: ../e_os.h ../include/openssl/e_os2.h
-rc5test.o: ../include/openssl/opensslconf.h rc5test.c
+rc5test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
+rc5test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
+rc5test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+rc5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
+rc5test.o: ../include/openssl/symhacks.h rc5test.c
 rmdtest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
 rmdtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
 rmdtest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h