Commit 0218fc37 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

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: default avatarRichard Levitte <levitte@openssl.org>
parent d0db7ee0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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....