[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Sat Mar 19 00:05:48 UTC 2016


The branch master has been updated
       via  a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90 (commit)
      from  b4ae8861214b5d73cbbd0e33e8a8be37f6a4c009 (commit)


- Log -----------------------------------------------------------------
commit a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Mar 18 20:52:29 2016 +0100

    Better 'make depend' mechanism
    
    Instead of relying on the '-nt' test operator, which doesn't exist
    everywhere, use find's '-newer' to find out if any of the known .d
    files is newer than Makefile.
    
    Closes RT#4444
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 Configurations/unix-Makefile.tmpl | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 3a1ade7..be6299b 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -257,32 +257,15 @@ clean: libclean
 # This exists solely for those who still type 'make depend'
 #
 # We check if any depfile is newer than Makefile and decide to
-# concatenate only if that is true, or if 'test' (a.k.a [ )
-# doesn't have the option to figure it out (-nt).
-#
-# To check if test has the file age comparison operator, we
-# simply try, and rely test to exit with 0 if the comparison
-# was true, 1 if false, and most importantly, 2 if it doesn't
-# recognise the operator.
+# concatenate only if that is true.
 depend:
 	@: {- output_off() if $disabled{makedepend}; "" -}
-	@catdepends=false; \
-	if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
-	  for d in $(DEPS); do \
-	    if [ $$d -nt Makefile ]; then \
-	      catdepends=true; \
-	      break; \
-	    fi; \
-	  done; \
-	else \
-	  catdepends=true; \
-	fi; \
-	if [ $$catdepends = true ]; then \
+	@if [ -z "`find $(DEPS) -newer Makefile`" ]; then \
 	  ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
 	    echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
 	    echo; \
-	    for d in $(DEPS); do \
-	      if [ -f $$d ]; then cat $$d; fi; \
+	    for f in $(DEPS); do \
+	      if [ -f $$f ]; then cat $$f; fi; \
 	    done ) > Makefile.new; \
 	  if cmp Makefile.new Makefile >/dev/null 2>&1; then \
 	    rm -f Makefile.new; \


More information about the openssl-commits mailing list