Build: adapt VMS build file template to use the extra macros

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7553)
This commit is contained in:
Richard Levitte 2016-10-14 17:10:15 +02:00
parent 21712b2fc1
commit 0a37ff4dca

View file

@ -199,7 +199,8 @@ ASOUTFLAG={- $target{asoutflag} -}$(OSSL_EMPTY)
CNF_ASFLAGS={- join('', $target{asflags} || (), CNF_ASFLAGS={- join('', $target{asflags} || (),
@{$config{asflags}}) -} @{$config{asflags}}) -}
CNF_DEFINES={- our $defines2 = join('', map { ",$_" } @{$target{defines}}, CNF_DEFINES={- our $defines2 = join('', map { ",$_" } @{$target{defines}},
@{$config{defines}}) -} @{$config{defines}},
"'extradefines'") -}
CNF_INCLUDES={- our $includes2 = join(',', @{$target{includes}}, CNF_INCLUDES={- our $includes2 = join(',', @{$target{includes}},
@{$config{includes}}) -} @{$config{includes}}) -}
CNF_CPPFLAGS={- our $cppflags2 = join('', $target{cppflags} || (), CNF_CPPFLAGS={- our $cppflags2 = join('', $target{cppflags} || (),
@ -810,6 +811,7 @@ EOF
@{$args{incs}}); @{$args{incs}});
my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!'; my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!';
my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!'; my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!';
my $defs = join("", map { ",".$_ } @{$args{defs}});
if (defined($generator)) { if (defined($generator)) {
# If the target is named foo.S in build.info, we want to # If the target is named foo.S in build.info, we want to
# end up generating foo.s in two steps. # end up generating foo.s in two steps.
@ -818,8 +820,10 @@ EOF
$target : $args{generator}->[0] $deps $target : $args{generator}->[0] $deps
$generator \$\@-S $generator \$\@-S
\@ $incs_on \@ $incs_on
\@ extradefines = "$defs"
PIPE \$(CPP) $cppflags \$\@-S | - PIPE \$(CPP) $cppflags \$\@-S | -
\$(PERL) -ne "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" > \$\@-i \$(PERL) -ne "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" > \$\@-i
\@ DELETE/SYMBOL/LOCAL extradefines
\@ $incs_off \@ $incs_off
RENAME \$\@-i \$\@ RENAME \$\@-i \$\@
DELETE \$\@-S DELETE \$\@-S
@ -834,9 +838,11 @@ EOF
return <<"EOF"; return <<"EOF";
$target : $args{generator}->[0] $deps $target : $args{generator}->[0] $deps
\@ $incs_on \@ $incs_on
\@ extradefines = "$defs"
SHOW SYMBOL qual_includes SHOW SYMBOL qual_includes
PIPE \$(CPP) $cppflags $args{generator}->[0] | - PIPE \$(CPP) $cppflags $args{generator}->[0] | -
\$(PERL) "-ne" "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" > \$\@ \$(PERL) "-ne" "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" > \$\@
\@ DELETE/SYMBOL/LOCAL extradefines
\@ $incs_off \@ $incs_off
EOF EOF
} }
@ -894,6 +900,7 @@ EOF
lib => '$(LIB_CPPFLAGS)', lib => '$(LIB_CPPFLAGS)',
dso => '$(DSO_CPPFLAGS)', dso => '$(DSO_CPPFLAGS)',
bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}}; bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}};
my $defs = join("", map { ",".$_ } @{$args{defs}});
my @incs_cmds = includes({ shlib => '$(LIB_INCLUDES)', my @incs_cmds = includes({ shlib => '$(LIB_INCLUDES)',
lib => '$(LIB_INCLUDES)', lib => '$(LIB_INCLUDES)',
@ -914,7 +921,9 @@ $obj.OBJ : $deps
${before} ${before}
SET DEFAULT $forward SET DEFAULT $forward
\@ $incs_on \@ $incs_on
\@ extradefines = "$defs"
\$(CC) ${cflags}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs \$(CC) ${cflags}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
\@ DELETE/SYMBOL/LOCAL extradefines
\@ $incs_off \@ $incs_off
SET DEFAULT $backward SET DEFAULT $backward
${after} ${after}