Whoops, OK. :-P Mike
On Thu, Aug 21, 2014 at 1:22 PM, Salz, Rich <[email protected]> wrote: >> Just generated a pull request for this; let me know if it's what you actually >> had in mind: >> >> https://github.com/openssl/openssl/pull/161 > > I already had the fix in-hand :) See attached. > > > > -- > Principal Security Engineer > Akamai Technologies, Cambridge MA > IM: [email protected] Twitter: RichSalz > > > ---------- Forwarded message ---------- > From: "Salz, Rich" <[email protected]> > To: "[email protected]" <[email protected]> > Cc: > Date: Thu, 21 Aug 2014 12:47:12 -0400 > Subject: Code review 3497: clean up dclean/clean targets > commit e02129dea29f7d091ce301b4f34e05559bb840d3 > Author: Rich Salz <[email protected]> > Date: Thu Aug 21 12:45:28 2014 -0400 > > RT3497: (re)move actions from dclean to clean > > Remove all special actions (anything other than building > dependencies) from dclean target to clean target. > Also, consistently use RECURSIVE_MAKE (not RECURSIVE_BUILD_CMD) > for all Makefiles that did recursive builds. > > diff --git a/Makefile.fips b/Makefile.fips > index b3811df..84a85f0 100644 > --- a/Makefile.fips > +++ b/Makefile.fips > @@ -251,23 +251,23 @@ BUILDENV= PLATFORM='$(PLATFORM)' > PROCESSOR='$(PROCESSOR)' \ > # BUILD_CMD is a generic macro to build a given target in a given > # subdirectory. The target must be given through the shell variable > # `target' and the subdirectory to build in must be given through `dir'. > -# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or > -# BUILD_ONE_CMD instead. > +# This macro shouldn't be used directly, use RECURSIVE_MAKE or > +# MAKE_ONE instead. > # > -# BUILD_ONE_CMD is a macro to build a given target in a given > -# subdirectory if that subdirectory is part of $(DIRS). It requires > -# exactly the same shell variables as BUILD_CMD. > -# > -# RECURSIVE_BUILD_CMD is a macro to build a given target in all > +# RECURSIVE_MAKE is a macro to build a given target in all > # subdirectories defined in $(DIRS). It requires that the target > # is given through the shell variable `target'. > +# > +# MAKE_ONE is a macro to build a given target in a given > +# subdirectory if that subdirectory is part of $(DIRS). It requires > +# exactly the same shell variables as BUILD_CMD. > 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 > -BUILD_ONE_CMD=\ > +RECURSIVE_MAKE=for dir in $(DIRS); do $(BUILD_CMD); done > +MAKE_ONE=\ > if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \ > $(BUILD_CMD); \ > fi > @@ -364,7 +364,7 @@ build_all: build_libs > build_libs: build_crypto build_fips > > build_fips: > - @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD) > + @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(MAKE_ONE) > > build_crypto: > if [ -n "$(FIPSCANLIB)" ]; then \ > @@ -378,23 +378,23 @@ build_crypto: > else \ > AS='$(CC) -c' ; \ > fi ; export AS ; \ > - dir=crypto; target=fips; $(BUILD_ONE_CMD) > + dir=crypto; target=fips; $(MAKE_ONE) > build_ssl: > - @dir=ssl; target=all; $(BUILD_ONE_CMD) > + @dir=ssl; target=all; $(MAKE_ONE) > build_engines: > - @dir=engines; target=all; $(BUILD_ONE_CMD) > + @dir=engines; target=all; $(MAKE_ONE) > build_apps: > - @dir=apps; target=all; $(BUILD_ONE_CMD) > + @dir=apps; target=all; $(MAKE_ONE) > build_tests: > - @dir=test; target=fipsexe; $(BUILD_ONE_CMD) > + @dir=test; target=fipsexe; $(MAKE_ONE) > build_algvs: > - @dir=test; target=fipsalgvs; $(BUILD_ONE_CMD) > + @dir=test; target=fipsalgvs; $(MAKE_ONE) > build_tools: > - @dir=tools; target=all; $(BUILD_ONE_CMD) > + @dir=tools; target=all; $(MAKE_ONE) > > all_testapps: build_libs build_testapps > build_testapps: > - @dir=crypto; target=testapps; $(BUILD_ONE_CMD) > + @dir=crypto; target=testapps; $(MAKE_ONE) > > libcrypto$(SHLIB_EXT): libcrypto.a build_fips > @if [ "$(SHLIB_TARGET)" != "" ]; then \ > @@ -503,11 +503,12 @@ libclean: > > clean: libclean > rm -f shlib/*.o *.o core a.out fluff testlog make.log cctest cctest.c > - @set -e; target=clean; $(RECURSIVE_BUILD_CMD) > + @set -e; target=clean; $(RECURSIVE_MAKE) > rm -f $(LIBS) > rm -f openssl.pc libssl.pc libcrypto.pc > rm -f speed.* .pure > rm -f $(TARFILE) > + rm -rf *.bak include/openssl certs/.0 > @set -e; for i in $(ONEDIRS) ;\ > do \ > rm -fr $$i/*; \ > @@ -519,12 +520,12 @@ makefile.one: files > > files: > $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO > - @set -e; target=files; $(RECURSIVE_BUILD_CMD) > + @set -e; target=files; $(RECURSIVE_MAKE) > > links: > @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl > @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) > - @set -e; dir=fips target=links; $(RECURSIVE_BUILD_CMD) > + @set -e; dir=fips target=links; $(RECURSIVE_MAKE) > @(cd crypto ; SDIRS='$(LINKDIRS)' $(MAKE) -e links) > > gentests: > @@ -532,8 +533,7 @@ gentests: > $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' > OPENSSL_DEBUG_MEMORY=on generate ); > > dclean: > - rm -rf *.bak include/openssl certs/.0 > - @set -e; target=dclean; $(RECURSIVE_BUILD_CMD) > + @set -e; target=dclean; $(RECURSIVE_MAKE) > > test: tests > > @@ -547,7 +547,7 @@ depend: > @echo make depend not supported ; false > > lint: > - @set -e; target=lint; $(RECURSIVE_BUILD_CMD) > + @set -e; target=lint; $(RECURSIVE_MAKE) > > tags: > rm -f TAGS > @@ -633,6 +633,6 @@ install_sw: > (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ > chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ > done; > - @set -e; target=install; $(RECURSIVE_BUILD_CMD) > + @set -e; target=install; $(RECURSIVE_MAKE) > > # DO NOT DELETE THIS LINE -- make depend depends on it. > diff --git a/Makefile.org b/Makefile.org > index d7c9db6..0cd1682 100644 > --- a/Makefile.org > +++ b/Makefile.org > @@ -246,23 +246,23 @@ BUILDENV= PLATFORM='$(PLATFORM)' > PROCESSOR='$(PROCESSOR)' \ > # BUILD_CMD is a generic macro to build a given target in a given > # subdirectory. The target must be given through the shell variable > # `target' and the subdirectory to build in must be given through `dir'. > -# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or > -# BUILD_ONE_CMD instead. > +# This macro shouldn't be used directly, use RECURSIVE_MAKE or > +# MAKE_ONE instead. > # > -# BUILD_ONE_CMD is a macro to build a given target in a given > -# subdirectory if that subdirectory is part of $(DIRS). It requires > -# exactly the same shell variables as BUILD_CMD. > -# > -# RECURSIVE_BUILD_CMD is a macro to build a given target in all > +# RECURSIVE_MAKE is a macro to build a given target in all > # subdirectories defined in $(DIRS). It requires that the target > # is given through the shell variable `target'. > +# > +# MAKE_ONE is a macro to build a given target in a given > +# subdirectory if that subdirectory is part of $(DIRS). It requires > +# exactly the same shell variables as BUILD_CMD. > 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 > -BUILD_ONE_CMD=\ > +RECURSIVE_MAKE=for dir in $(DIRS); do $(BUILD_CMD); done > +MAKE_ONE=\ > if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \ > $(BUILD_CMD); \ > fi > @@ -359,7 +359,7 @@ build_all: build_libs build_apps build_tests build_tools > build_libs: build_crypto build_fips build_ssl build_engines > > build_fips: > - @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD) > + @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(MAKE_ONE) > > build_crypto: > if [ -n "$(FIPSCANLIB)" ]; then \ > @@ -373,21 +373,21 @@ build_crypto: > else \ > AS='$(CC) -c' ; \ > fi ; export AS ; \ > - dir=crypto; target=all; $(BUILD_ONE_CMD) > + dir=crypto; target=all; $(MAKE_ONE) > build_ssl: > - @dir=ssl; target=all; $(BUILD_ONE_CMD) > + @dir=ssl; target=all; $(MAKE_ONE) > build_engines: > - @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD) > + @dir=engines; target=all; AS='$(CC) -c'; export AS; $(MAKE_ONE) > build_apps: > - @dir=apps; target=all; $(BUILD_ONE_CMD) > + @dir=apps; target=all; $(MAKE_ONE) > build_tests: > - @dir=test; target=all; $(BUILD_ONE_CMD) > + @dir=test; target=all; $(MAKE_ONE) > build_tools: > - @dir=tools; target=all; $(BUILD_ONE_CMD) > + @dir=tools; target=all; $(MAKE_ONE) > > all_testapps: build_libs build_testapps > build_testapps: > - @dir=crypto; target=testapps; $(BUILD_ONE_CMD) > + @dir=crypto; target=testapps; $(MAKE_ONE) > > libcrypto$(SHLIB_EXT): libcrypto.a build_fips > @if [ "$(SHLIB_TARGET)" != "" ]; then \ > @@ -495,8 +495,9 @@ libclean: > rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll > engines/*.dylib *.a engines/*.a */lib */*/lib > > clean: libclean > + rm -rf *.bak include/openssl certs/.0 > rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log > cctest cctest.c > - @set -e; target=clean; $(RECURSIVE_BUILD_CMD) > + @set -e; target=clean; $(RECURSIVE_MAKE) > rm -f $(LIBS) > rm -f openssl.pc libssl.pc libcrypto.pc > rm -f speed.* .pure > @@ -512,12 +513,12 @@ makefile.one: files > > files: > $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO > - @set -e; target=files; $(RECURSIVE_BUILD_CMD) > + @set -e; target=files; $(RECURSIVE_MAKE) > > links: > @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl > @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) > - @set -e; target=links; $(RECURSIVE_BUILD_CMD) > + @set -e; target=links; $(RECURSIVE_MAKE) > @if [ -z "$(FIPSCANLIB)" ]; then \ > set -e; target=links; dir=fips ; $(BUILD_CMD) ; \ > fi > @@ -527,8 +528,7 @@ gentests: > $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' > OPENSSL_DEBUG_MEMORY=on generate ); > > dclean: > - rm -rf *.bak include/openssl certs/.0 > - @set -e; target=dclean; $(RECURSIVE_BUILD_CMD) > + @set -e; target=dclean; $(RECURSIVE_MAKE) > > rehash: rehash.time > rehash.time: certs apps > @@ -552,10 +552,10 @@ report: > @$(PERL) util/selftest.pl > > depend: > - @set -e; target=depend; $(RECURSIVE_BUILD_CMD) > + @set -e; target=depend; $(RECURSIVE_MAKE) > > lint: > - @set -e; target=lint; $(RECURSIVE_BUILD_CMD) > + @set -e; target=lint; $(RECURSIVE_MAKE) > > tags: > rm -f TAGS > @@ -646,7 +646,7 @@ install_sw: > (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ > chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ > done; > - @set -e; target=install; $(RECURSIVE_BUILD_CMD) > + @set -e; target=install; $(RECURSIVE_MAKE) > @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ > do \ > if [ -f "$$i" ]; then \ > diff --git a/apps/Makefile b/apps/Makefile > index 37e35e5..9f830fd 100644 > --- a/apps/Makefile > +++ b/apps/Makefile > @@ -137,11 +137,11 @@ depend: > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - rm -f CA.pl > > clean: > rm -f *.o *.obj *.dll lib tags core .pure .nfs* *.old *.bak fluff > $(EXE) > rm -f req > + rm -f CA.pl > > $(DLIBSSL): > (cd ..; $(MAKE) DIRS=ssl all) > diff --git a/crypto/Makefile b/crypto/Makefile > index 0537913..e08758f 100644 > --- a/crypto/Makefile > +++ b/crypto/Makefile > @@ -139,13 +139,13 @@ depend: > > clean: > rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old > *.bak fluff > + rm -f opensslconf.h > @target=clean; $(RECURSIVE_MAKE) > > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - rm -f opensslconf.h > - @target=dclean; $(RECURSIVE_MAKE) > + @set -e; target=dclean; $(RECURSIVE_MAKE) > > # DO NOT DELETE THIS LINE -- make depend depends on it. > > diff --git a/crypto/md4/Makefile b/crypto/md4/Makefile > index 11866d7..fed2d80 100644 > --- a/crypto/md4/Makefile > +++ b/crypto/md4/Makefile > @@ -69,7 +69,6 @@ depend: > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - rm -f ../../include/openssl/$(EXHEADER) ../../test/$(TEST) > ../../apps/$(APPS) > > clean: > rm -f asm/mx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* > *.old *.bak fluff > diff --git a/engines/Makefile b/engines/Makefile > index 4bad384..27c508a 100644 > --- a/engines/Makefile > +++ b/engines/Makefile > @@ -165,7 +165,7 @@ depend: > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - @target=dclean; $(RECURSIVE_MAKE) > + @set -e; target=dclean; $(RECURSIVE_MAKE) > > clean: > rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff > diff --git a/fips/Makefile b/fips/Makefile > index fb50838..6467194 100644 > --- a/fips/Makefile > +++ b/fips/Makefile > @@ -215,7 +215,7 @@ clean: > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - @target=dclean; $(RECURSIVE_MAKE) > + @set -e; target=dclean; $(RECURSIVE_MAKE) > > # DO NOT DELETE THIS LINE -- make depend depends on it. > > diff --git a/test/Makefile b/test/Makefile > index 4a06599..8562cc7 100644 > --- a/test/Makefile > +++ b/test/Makefile > @@ -401,11 +401,11 @@ depend: > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - rm -f $(SRC) $(SHA256TEST).c $(SHA512TEST).c evptests.txt newkey.pem > testkey.pem \ > - testreq.pem > > clean: > rm -f .rnd tmp.bntest tmp.bctest *.o *.obj *.dll lib tags core .pure > .nfs* *.old *.bak fluff $(EXE) $(FIPSEXE) *.ss *.srl log dummytest > + rm -f $(SRC) $(SHA256TEST).c $(SHA512TEST).c evptests.txt newkey.pem > testkey.pem \ > + testreq.pem > > $(DLIBSSL): > (cd ..; $(MAKE) DIRS=ssl all) > diff --git a/tools/Makefile b/tools/Makefile > index bb6fb71..b50218d 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -49,10 +49,10 @@ depend: > dclean: > $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' > $(MAKEFILE) >Makefile.new > mv -f Makefile.new $(MAKEFILE) > - rm -f c_rehash > > clean: > rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff > + rm -f c_rehash > > errors: > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > Team Mailing List [email protected] > Automated List Manager [email protected] > ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
