Previously, we updated the static libraries (libcrypto.a on Unix,
libcrypto.lib on Windows) with all the object files, regardless of if
they were rebuilt or not. With this change, we only update them with
the object files were rebuilt.
NOTE: this does not apply on VMS, as the expansion of $? may be too
large for a command line.
Reviewed-by: Andy Polyakov <appro@openssl.org>
my $objs = join(" ", map { $_.$objext } @{$args{objs}});
return <<"EOF";
$lib$libext: $objs
- \$(AR) \$\@ $objs
+ \$(AR) \$\@ \$\?
\$(RANLIB) \$\@ || echo Never mind.
EOF
}
return <<"EOF";
$lib$libext: $deps
\$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib$libext @<<
-$objs
+\$\?
<<
EOF
}