mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05: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"] : [];
|
$extradeps = $forceobj{$d->{obj_orig}} ? ["*.c","*.h","*.rc"] : [];
|
||||||
my $rule;
|
my $rule;
|
||||||
my @deps = @{$d->{deps}};
|
my @deps = @{$d->{deps}};
|
||||||
|
my @incdeps = grep { m!\.rc2?$! } @deps;
|
||||||
|
my @rcdeps = grep { ! m!\.rc2$! } @deps;
|
||||||
if ($d->{obj} =~ /\.res$/) {
|
if ($d->{obj} =~ /\.res$/) {
|
||||||
my $rc = $deps[0];
|
my $rc = $deps[0];
|
||||||
my $rcpp = $rc;
|
my $rcpp = $rc;
|
||||||
@ -582,14 +584,15 @@ if (defined $makefiles{'clangcl'}) {
|
|||||||
$rcpp =~ s/\.rc$/.rcpp/;
|
$rcpp =~ s/\.rc$/.rcpp/;
|
||||||
$rcpp = "\$(BUILDDIR)" . $rcpp;
|
$rcpp = "\$(BUILDDIR)" . $rcpp;
|
||||||
$rule = "\$(RC) ".$rcpp." /FO ".$d->{obj};
|
$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";
|
"\t\$(RCPREPROC) \$(RCPPFLAGS) /Fi\$\@ \$<\n\n";
|
||||||
$deps[0] = $rcpp;
|
$rcdeps[0] = $rcpp;
|
||||||
} else {
|
} else {
|
||||||
$rule = "\$(CC) /Fo\$(BUILDDIR) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) /c \$<";
|
$rule = "\$(CC) /Fo\$(BUILDDIR) \$(COMPAT) \$(CFLAGS) \$(XFLAGS) /c \$<";
|
||||||
}
|
}
|
||||||
print &splitline(sprintf("%s: %s", $d->{obj},
|
print &splitline(sprintf("%s: %s", $d->{obj},
|
||||||
join " ", @$extradeps, @deps)), "\n";
|
join " ", @$extradeps, @rcdeps)), "\n";
|
||||||
print "\t" . $rule . "\n\n";
|
print "\t" . $rule . "\n\n";
|
||||||
}
|
}
|
||||||
print "\n" . $rc_pp_rules;
|
print "\n" . $rc_pp_rules;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user