mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-15 10:59:39 +00:00
VMS: take care of includes
Configurations/descrip.mms.tmpl didn't treat the includes config attribute very well. In fact, it didn't treat it at all! Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5295)
This commit is contained in:
parent
4cd58771d8
commit
2e8b0ef8f4
@ -175,9 +175,12 @@ CC= {- $config{cc} -}
|
|||||||
DEFINES={- our $defines = join(",",
|
DEFINES={- our $defines = join(",",
|
||||||
'__dummy', # To make comma processing easier
|
'__dummy', # To make comma processing easier
|
||||||
@{$config{defines}}) -}
|
@{$config{defines}}) -}
|
||||||
|
INCLUDES={- our $includes = join(',', @{$config{includes}}) -}
|
||||||
CPPFLAGS={- our $cppflags = join('', @{$config{cppflags}}) -}
|
CPPFLAGS={- our $cppflags = join('', @{$config{cppflags}}) -}
|
||||||
CPPFLAGS_Q={- $cppflags =~ s|"|""|g; $defines =~ s|"|""|g;
|
CPPFLAGS_Q={- (my $x = $cppflags) =~ s|"|""|g; $defines =~ s|"|""|g;
|
||||||
$cppflags."/DEFINE($defines)" -}
|
$x .= "/DEFINE=($defines)";
|
||||||
|
$x .= "/INCLUDE=($includes)" if $includes;
|
||||||
|
$x; -}
|
||||||
CFLAGS={- join('', @{$config{cflags}}) -}
|
CFLAGS={- join('', @{$config{cflags}}) -}
|
||||||
LDFLAGS= {- join('', @{$config{lflags}}) -}
|
LDFLAGS= {- join('', @{$config{lflags}}) -}
|
||||||
EX_LIBS= {- join('', map { ','.$_ } @{$config{ex_libs}}) -}
|
EX_LIBS= {- join('', map { ','.$_ } @{$config{ex_libs}}) -}
|
||||||
@ -635,10 +638,8 @@ EOF
|
|||||||
dso => '$(DSO_DEFINES)',
|
dso => '$(DSO_DEFINES)',
|
||||||
bin => '$(BIN_DEFINES)' } -> {$args{intent}};
|
bin => '$(BIN_DEFINES)' } -> {$args{intent}};
|
||||||
$cflags .= '/DEFINE=('.$defines.')';
|
$cflags .= '/DEFINE=('.$defines.')';
|
||||||
|
$cflags .= "/INCLUDE=('tmp_includes')";
|
||||||
|
|
||||||
my $incs_on = "\@ !";
|
|
||||||
my $incs_off = "\@ !";
|
|
||||||
my $incs = "";
|
|
||||||
my @incs = ();
|
my @incs = ();
|
||||||
push @incs, @{$args{incs}} if @{$args{incs}};
|
push @incs, @{$args{incs}} if @{$args{incs}};
|
||||||
unless ($disabled{zlib}) {
|
unless ($disabled{zlib}) {
|
||||||
@ -646,15 +647,37 @@ EOF
|
|||||||
# incarnations.
|
# incarnations.
|
||||||
push @incs, ($withargs{zlib_include} || 'GNV$ZLIB_INCLUDE:');
|
push @incs, ($withargs{zlib_include} || 'GNV$ZLIB_INCLUDE:');
|
||||||
}
|
}
|
||||||
|
# We create a logical name TMP_INCLUDES: to hold the list of internal
|
||||||
|
# includes. However, we cannot use it directly, as logical names can't
|
||||||
|
# hold zero entries, so we also create a symbol with the same name and
|
||||||
|
# use that instead, see the '/INCLUDE=' assignment above. If there are
|
||||||
|
# no internal include directories, it will simply be the empty string,
|
||||||
|
# but if there are, it will be assigned "TMP_DEFINES:,"
|
||||||
|
my $xtraincludes = { lib => '$(LIB_INCLUDES)',
|
||||||
|
dso => '$(DSO_INCLUDES)',
|
||||||
|
bin => '$(BIN_INCLUDES)' } -> {$args{intent}};
|
||||||
|
my $incs_add =
|
||||||
|
'IF tmp_add .NES. "" .AND. tmp_includes .NES. "" THEN tmp_includes = "," + tmp_includes'
|
||||||
|
."\n\t".'tmp_includes = tmp_add + tmp_includes';
|
||||||
|
my $incs_on = 'tmp_includes := '
|
||||||
|
."\n\t"."tmp_add := $xtraincludes"
|
||||||
|
."\n\t".$incs_add
|
||||||
|
."\n\t".'tmp_add := $(INCLUDES)'
|
||||||
|
."\n\t".$incs_add;
|
||||||
|
my $incs_off = 'DELETE/SYMBOL/LOCAL tmp_includes'
|
||||||
|
."\n\t".'DELETE/SYMBOL/LOCAL tmp_add';
|
||||||
if (@incs) {
|
if (@incs) {
|
||||||
$incs_on =
|
$incs_on =
|
||||||
"DEFINE tmp_includes "
|
'DEFINE tmp_includes '
|
||||||
.join(",-\n\t\t\t", map {
|
.join(",-\n\t\t\t", map {
|
||||||
file_name_is_absolute($_)
|
file_name_is_absolute($_)
|
||||||
? $_ : catdir($backward,$_)
|
? $_ : catdir($backward,$_)
|
||||||
} @incs);
|
} @incs)
|
||||||
$incs_off = "DEASSIGN tmp_includes";
|
."\n\t".$incs_on
|
||||||
$incs = " /INCLUDE=(tmp_includes:)";
|
."\n\t".'IF tmp_includes .NES. "" THEN tmp_includes = "," + tmp_includes'
|
||||||
|
."\n\t".'tmp_includes = "tmp_includes:" + tmp_includes';
|
||||||
|
$incs_off .=
|
||||||
|
"\n\t".'DEASSIGN tmp_includes';
|
||||||
}
|
}
|
||||||
my $before = $unified_info{before}->{$obj.".OBJ"} || "\@ !";
|
my $before = $unified_info{before}->{$obj.".OBJ"} || "\@ !";
|
||||||
my $after = $unified_info{after}->{$obj.".OBJ"} || "\@ !";
|
my $after = $unified_info{after}->{$obj.".OBJ"} || "\@ !";
|
||||||
@ -666,7 +689,7 @@ $obj.OBJ : $deps
|
|||||||
${before}
|
${before}
|
||||||
SET DEFAULT $forward
|
SET DEFAULT $forward
|
||||||
$incs_on
|
$incs_on
|
||||||
\$(CC) ${cflags}${incs}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
|
\$(CC) ${cflags}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
|
||||||
$incs_off
|
$incs_off
|
||||||
SET DEFAULT $backward
|
SET DEFAULT $backward
|
||||||
${after}
|
${after}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user