windows-makefile.tmpl: clean up after DLL link failure.
authorAndy Polyakov <appro@openssl.org>
Wed, 6 Apr 2016 15:27:01 +0000 (17:27 +0200)
committerAndy Polyakov <appro@openssl.org>
Thu, 7 Apr 2016 19:12:10 +0000 (21:12 +0200)
Without proper cleanup after DLL link failure second attempt to
run nmake would actually proceed and failure will be "shifted" to
run time. This is because libcrypto.lib import library is generated
even if DLL link fails.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Configurations/windows-makefile.tmpl

index b4672ab791cafb50a8b4a43e0f40383e241237d6..c67ff83af4938f61d1d5600f4b4661b66534ce17 100644 (file)
@@ -360,7 +360,7 @@ $target: $deps $ordinalsfile $mkdef_pl
        \$(PERL) $mkrc_pl $shlib$shlibext > $shlib.rc
        \$(RC) \$(RCOUTFLAG)$shlib.res $shlib.rc
        \$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) \\
-               /implib:$target \$(LDOUTFLAG)$shlib$shlibext /def:$shlib.def @<<
+               /implib:\$@ \$(LDOUTFLAG)$shlib$shlibext /def:$shlib.def @<< || (DEL /Q \$(\@B).* $shlib.* && EXIT 1)
 $objs $shlib.res$linklibs \$(EX_LIBS)
 <<
        DEL /F apps\\$shlib$shlibext