[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Thu Mar 10 09:03:05 UTC 2016
The branch master has been updated
via d46057277f3b805e5f198e31fc81a892bf5c9141 (commit)
from 8cffddc0f2c59768e724a4c8dc68822cfea5cacc (commit)
- Log -----------------------------------------------------------------
commit d46057277f3b805e5f198e31fc81a892bf5c9141
Author: Richard Levitte <levitte at openssl.org>
Date: Thu Mar 10 09:04:09 2016 +0100
Pass down inclusion directories to source file generators
The source file generators sometimes use $(CC) to post-process
generated source, and getting the inclusion directories may be
necessary at times, so we pass them down.
RT#4406
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
Configurations/common.tmpl | 11 +++++++++--
Configurations/unix-Makefile.tmpl | 5 +++--
Configurations/windows-makefile.tmpl | 5 +++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl
index c2362d0..d89817e 100644
--- a/Configurations/common.tmpl
+++ b/Configurations/common.tmpl
@@ -32,17 +32,24 @@
@newlist;
}
+ # dogenerate is responsible for producing all the recipes that build
+ # generated source files. It recurses in case a dependency is also a
+ # generated source file.
sub dogenerate {
my $src = shift;
return "" if $cache{$src};
+ my $obj = shift;
+ my $bin = shift;
my %opts = @_;
if ($unified_info{generate}->{$src}) {
$OUT .= generatesrc(src => $src,
generator => $unified_info{generate}->{$src},
deps => $unified_info{depends}->{$src},
+ incs => [ @{$unified_info{includes}->{$bin}},
+ @{$unified_info{includes}->{$obj}} ],
%opts);
foreach (@{$unified_info{depends}->{$src}}) {
- dogenerate($_, %opts);
+ dogenerate($_, $obj, $bin, %opts);
}
}
$cache{$src} = 1;
@@ -65,7 +72,7 @@
%opts);
foreach ((@{$unified_info{sources}->{$obj}},
@{$unified_info{depends}->{$obj}})) {
- dogenerate($_, %opts);
+ dogenerate($_, $obj, $bin, %opts);
}
}
$cache{$obj} = 1;
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 02e8cb4..114a4be 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -825,6 +825,7 @@ configdata.pm: {- $config{build_file_template} -} $(SRCDIR)/Configurations/commo
sub generatesrc {
my %args = @_;
my $generator = join(" ", @{$args{generator}});
+ my $incs = join("", map { " -I".$_ } @{$args{incs}});
if ($args{src} !~ /\.[sS]$/) {
return <<"EOF";
@@ -851,7 +852,7 @@ EOF
$target: $args{generator}->[0]
( trap "rm -f \$@.S" INT; \\
$generator \$@.S; \\
- \$(CC) \$(CFLAGS) -E -P \$@.S > \$@ && rm -f \$@.S )
+ \$(CC) \$(CFLAGS) $incs -E -P \$@.S > \$@ && rm -f \$@.S )
EOF
}
# Otherwise....
@@ -862,7 +863,7 @@ EOF
}
return <<"EOF";
$args{src}: $args{generator}->[0]
- \$(CC) \$(CFLAGS) -E -P \$< > \$@
+ \$(CC) \$(CFLAGS) $incs -E -P \$< > \$@
EOF
}
}
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 7b78f9f..967146f 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -171,6 +171,7 @@ configdata.pm: {- $config{build_file_template} -} $(SRCDIR)\Configure
my %args = @_;
(my $target = $args{src}) =~ s/\.[sS]$/.asm/;
my $generator = join(" ", @{$args{generator}});
+ my $incs = join("", map { " /I ".$_ } @{$args{incs}});
if ($target !~ /\.asm$/) {
return <<"EOF";
@@ -195,7 +196,7 @@ $target: $args{generator}->[0]
set ASM=\$(AS)
set CC=\$(CC)
$generator \$@.S
- \$(CC) \$(CFLAGS) /EP /C \$@.S > \$@
+ \$(CC) \$(CFLAGS) $incs /EP /C \$@.S > \$@
del /Q \$@.S
EOF
}
@@ -209,7 +210,7 @@ EOF
}
return <<"EOF";
$target: $args{generator}->[0]
- \$(CC) \$(CFLAGS) /EP /C \$< > \$@
+ \$(CC) \$(CFLAGS) $incs /EP /C \$< > \$@
EOF
}
}
More information about the openssl-commits
mailing list