From: Richard Levitte Date: Sat, 2 Apr 2016 15:10:03 +0000 (+0200) Subject: make depend: Check that find returned a non-empty string rather than an empty X-Git-Tag: OpenSSL_1_1_0-pre5~171 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=e3d818588056ec8fed501e1f5970ef9b5b057fc5 make depend: Check that find returned a non-empty string rather than an empty The logic to find out of there are any .d files newer than Makefile is sound. Checking the result was less so. Reviewed-by: Rich Salz --- diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index e381237bb9..5b9a23fd6d 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -261,7 +261,7 @@ clean: libclean # concatenate only if that is true. depend: @: {- output_off() if $disabled{makedepend}; "" -} - @if [ -z "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then \ + @if [ -n "`find $(DEPS) -newer Makefile 2>/dev/null; exit 0`" ]; then \ ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \ echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \ echo; \