Use the dependencies received in generatesrc()
generatesrc() did already receive dependency information, but never used it, and never really needed to... until now. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
91056e7269
commit
769777b0a2
3 changed files with 12 additions and 9 deletions
|
@ -418,10 +418,11 @@ configdata.pm : {- join(" ", sourcefile("Configurations", "descrip.mms.tmpl"), s
|
|||
sub generatesrc {
|
||||
my %args = @_;
|
||||
my $generator = join(" ", @{$args{generator}});
|
||||
my $deps = join(", -\n\t\t", @{$args{deps}});
|
||||
|
||||
if ($args{src} !~ /\.[sS]$/) {
|
||||
return <<"EOF";
|
||||
$args{src} : $args{generator}->[0]
|
||||
$args{src} : $args{generator}->[0] $deps
|
||||
\$(PERL) $generator > \$@
|
||||
EOF
|
||||
} else {
|
||||
|
|
|
@ -802,10 +802,11 @@ configdata.pm: $(SRCDIR)/Configurations/unix-Makefile.tmpl $(SRCDIR)/Configurati
|
|||
my %args = @_;
|
||||
my $generator = join(" ", @{$args{generator}});
|
||||
my $incs = join("", map { " -I".$_ } @{$args{incs}});
|
||||
my $deps = join(" ", @{$args{deps}});
|
||||
|
||||
if ($args{src} !~ /\.[sS]$/) {
|
||||
return <<"EOF";
|
||||
$args{src}: $args{generator}->[0]
|
||||
$args{src}: $args{generator}->[0] $deps
|
||||
\$(PERL) $generator > \$@
|
||||
EOF
|
||||
} else {
|
||||
|
@ -825,7 +826,7 @@ EOF
|
|||
if ($args{src} =~ /\.S$/) {
|
||||
(my $target = $args{src}) =~ s|\.S$|.s|;
|
||||
return <<"EOF";
|
||||
$target: $args{generator}->[0]
|
||||
$target: $args{generator}->[0] $deps
|
||||
( trap "rm -f \$@.*" INT 0; \\
|
||||
$generator \$@.S; \\
|
||||
\$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@.i && mv -f \$@.i \$@ )
|
||||
|
@ -833,12 +834,12 @@ EOF
|
|||
}
|
||||
# Otherwise....
|
||||
return <<"EOF";
|
||||
$args{src}: $args{generator}->[0]
|
||||
$args{src}: $args{generator}->[0] $deps
|
||||
$generator \$@
|
||||
EOF
|
||||
}
|
||||
return <<"EOF";
|
||||
$args{src}: $args{generator}->[0]
|
||||
$args{src}: $args{generator}->[0] $deps
|
||||
\$(CC) \$(CFLAGS) $incs -E -P \$< > \$@
|
||||
EOF
|
||||
}
|
||||
|
|
|
@ -243,10 +243,11 @@ configdata.pm: {- $config{build_file_template} -} $(SRCDIR)\Configure
|
|||
(my $target = $args{src}) =~ s/\.[sS]$/.asm/;
|
||||
my $generator = join(" ", @{$args{generator}});
|
||||
my $incs = join("", map { " /I ".$_ } @{$args{incs}});
|
||||
my $deps = join(" ", @{$args{deps}});
|
||||
|
||||
if ($target !~ /\.asm$/) {
|
||||
return <<"EOF";
|
||||
$target: $args{generator}->[0]
|
||||
$target: $args{generator}->[0] $deps
|
||||
\$(PERL) $generator > \$@
|
||||
EOF
|
||||
} else {
|
||||
|
@ -263,7 +264,7 @@ EOF
|
|||
# end up generating foo.s in two steps.
|
||||
if ($args{src} =~ /\.S$/) {
|
||||
return <<"EOF";
|
||||
$target: $args{generator}->[0]
|
||||
$target: $args{generator}->[0] $deps
|
||||
set ASM=\$(AS)
|
||||
set CC=\$(CC)
|
||||
$generator \$@.S
|
||||
|
@ -273,14 +274,14 @@ EOF
|
|||
}
|
||||
# Otherwise....
|
||||
return <<"EOF";
|
||||
$target: $args{generator}->[0]
|
||||
$target: $args{generator}->[0] $deps
|
||||
set ASM=\$(AS)
|
||||
set CC=\$(CC)
|
||||
$generator \$@
|
||||
EOF
|
||||
}
|
||||
return <<"EOF";
|
||||
$target: $args{generator}->[0]
|
||||
$target: $args{generator}->[0] $deps
|
||||
\$(CC) \$(CFLAGS) $incs /EP /C \$< > \$@
|
||||
EOF
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue