mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
mkfiles.pl: fix dependencies in .rc preprocessing.
In the clang-cl makefile, we run the .rc file through the preprocessor and the actual resource compiler in two separate steps. But all the include-file dependencies were being put on the _latter_ step, so editing a .rc2 file didn't trigger a rebuild of the resource file.
This commit is contained in:
parent
93a5b56439
commit
715356e6d2
@ -575,6 +575,8 @@ if (defined $makefiles{'clangcl'}) {
|
||||
$extradeps = $forceobj{$d->{obj_orig}} ? ["*.c","*.h","*.rc"] : [];
|
||||
my $rule;
|
||||
my @deps = @{$d->{deps}};
|
||||
my @incdeps = grep { m!\.rc2?$! } @deps;
|
||||
my @rcdeps = grep { ! m!\.rc2$! } @deps;
|
||||
if ($d->{obj} =~ /\.res$/) {
|
||||
my $rc = $deps[0];
|
||||
my $rcpp = $rc;
|
||||
@ -582,14 +584,15 @@ if (defined $makefiles{'clangcl'}) {
|
||||
$rcpp =~ s/\.rc$/.rcpp/;
|
||||
$rcpp = "\$(BUILDDIR)" . $rcpp;
|
||||
$rule = "\$(RC) ".$rcpp." /FO ".$d->{obj};
|
||||
$rc_pp_rules .= "$rcpp: $rc\n" .
|
||||
$rc_pp_rules .= &splitline(
|
||||
sprintf("%s: %s", $rcpp, join " ", @incdeps)) ."\n" .
|
||||
"\t\$(RCPREPROC) \$(RCPPFLAGS) /Fi\$\@ \$<\n\n";
|
||||
$deps[0] = $rcpp;
|
||||
$rcdeps[0] = $rcpp;
|
||||
} else {
|
||||
$rule = "\$(CC) /Fo\$(BUILDDIR) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) /c \$<";
|
||||
}
|
||||
print &splitline(sprintf("%s: %s", $d->{obj},
|
||||
join " ", @$extradeps, @deps)), "\n";
|
||||
join " ", @$extradeps, @rcdeps)), "\n";
|
||||
print "\t" . $rule . "\n\n";
|
||||
}
|
||||
print "\n" . $rc_pp_rules;
|
||||
|
Loading…
Reference in New Issue
Block a user