summaryrefslogtreecommitdiffstats
path: root/Configurations/unix-Makefile.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-03-10 09:04:09 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-10 10:02:29 +0100
commitd46057277f3b805e5f198e31fc81a892bf5c9141 (patch)
tree1af8070e94fbdf7cc4b799936380c68000341274 /Configurations/unix-Makefile.tmpl
parent8cffddc0f2c59768e724a4c8dc68822cfea5cacc (diff)
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@openssl.org>
Diffstat (limited to 'Configurations/unix-Makefile.tmpl')
-rw-r--r--Configurations/unix-Makefile.tmpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 02e8cb4654..114a4be2be 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
}
}