From: Andy Polyakov Date: Fri, 11 Mar 2016 10:55:44 +0000 (+0100) Subject: Configurations/unix-Makefile.tmpl: don't leave empty .s files behind. X-Git-Tag: OpenSSL_1_1_0-pre4~64 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0218fc3778428a7b485335bb369f0040d97d74cf;p=oweals%2Fopenssl.git Configurations/unix-Makefile.tmpl: don't leave empty .s files behind. If pre-processor failed, an empty .s file could be left behind, which could get successfully compiled if one simply re-ran make and cause linking failures. Not anymore. Remove even intermediate .S in case of pre-processor failure. Reviewed-by: Richard Levitte --- diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 3718467fac..05844f00a4 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -850,9 +850,9 @@ EOF (my $target = $args{src}) =~ s|\.S$|.s|; return <<"EOF"; $target: $args{generator}->[0] - ( trap "rm -f \$@.S" INT; \\ + ( trap "rm -f \$@.*" INT 0; \\ $generator \$@.S; \\ - \$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@ && rm -f \$@.S ) + \$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@.i && mv -f \$@.i \$@ ) EOF } # Otherwise....