windows-makefile.tmpl: don't use $? in library targets.
authorAndy Polyakov <appro@openssl.org>
Sun, 26 Jun 2016 12:40:35 +0000 (14:40 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 27 Jun 2016 21:26:12 +0000 (23:26 +0200)
Problem with Microsoft lib.exe is that it doesn't *update* modules
in .lib archive, but creates new one upon every invocation. As result
if a source file was updated and nmake was executed, a useless archive
with only one module was created. In other words one has to always
pass all .obj modules on command line, not only recently recompiled.

[This also creates dilemma for directory targets, e.g. crypto\aes,
that were added to simplify every-day life for developer. Since
whole idea behind those targets is to minimize the re-compile time
upon single file modification, the only sensible thing to do is to
omit intended library update.]

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

index 0d21c50f03294e075011cca6f6ca28dcd14a71d7..aae7de3655b3181cc2582654401d22a6658b7d36 100644 (file)
@@ -484,7 +484,7 @@ EOF
      return <<"EOF";
 $lib$libext: $deps
        \$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib$libext @<<
      return <<"EOF";
 $lib$libext: $deps
        \$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib$libext @<<
-\$\?
+\$**
 <<
 EOF
  }
 <<
 EOF
  }
@@ -530,11 +530,7 @@ EOF
           next unless defined($unified_info{dirinfo}->{$dir}->{products}->{$type});
           if ($type eq "lib") {
               foreach my $lib (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {
           next unless defined($unified_info{dirinfo}->{$dir}->{products}->{$type});
           if ($type eq "lib") {
               foreach my $lib (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {
-                  push @actions, <<"EOF";
-       \$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib$libext @<<
-\$\?
-<<
-EOF
+                  push @actions, "";
               }
           } else {
               foreach my $prod (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {
               }
           } else {
               foreach my $prod (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {