mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-06 14:39:40 +00:00
Build cleanup: Remove the VMS hack from test/build.info
There was a hack specifically for VMS, which involved setting a make variable to indicate that test/libtestutil contains a 'main'. Instead, we use the new attributes 'has_main' to indicate this, and let the VMS build file template fend with it appropriately. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8125)
This commit is contained in:
parent
d1dd5d6f4c
commit
77550dbf7a
@ -698,7 +698,10 @@ reconfigure reconf :
|
|||||||
# Depending on shared libraries:
|
# Depending on shared libraries:
|
||||||
# On Windows POSIX layers, we depend on {libname}.dll.a
|
# On Windows POSIX layers, we depend on {libname}.dll.a
|
||||||
# On Unix platforms, we depend on {shlibname}.so
|
# On Unix platforms, we depend on {shlibname}.so
|
||||||
return map { platform->sharedlib($_) // platform->staticlib($_) } @_;
|
return map {
|
||||||
|
{ lib => platform->sharedlib($_) // platform->staticlib($_),
|
||||||
|
attrs => $unified_info{attributes}->{$_} }
|
||||||
|
} @_;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Helper function to deal with inclusion directory specs.
|
# Helper function to deal with inclusion directory specs.
|
||||||
@ -968,7 +971,7 @@ EOF
|
|||||||
@{$args{objs}};
|
@{$args{objs}};
|
||||||
my @deps = compute_lib_depends(@{$args{deps}});
|
my @deps = compute_lib_depends(@{$args{deps}});
|
||||||
die "More than one symbol vector" if scalar @defs > 1;
|
die "More than one symbol vector" if scalar @defs > 1;
|
||||||
my $deps = join(", -\n\t\t", @objs, @defs, @deps);
|
my $deps = join(", -\n\t\t", @objs, @defs, map { $_->{lib} } @deps);
|
||||||
my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
|
my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
|
||||||
my $translatesyms_pl = abs2rel(rel2abs(catfile($config{sourcedir},
|
my $translatesyms_pl = abs2rel(rel2abs(catfile($config{sourcedir},
|
||||||
"VMS", "translatesyms.pl")),
|
"VMS", "translatesyms.pl")),
|
||||||
@ -982,7 +985,8 @@ EOF
|
|||||||
"WRITE OPT_FILE \"$x" } @objs).
|
"WRITE OPT_FILE \"$x" } @objs).
|
||||||
"\"";
|
"\"";
|
||||||
my $write_opt2 =
|
my $write_opt2 =
|
||||||
join("\n\t", map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
|
join("\n\t", map { my $x = $_->{lib} =~ /\[/
|
||||||
|
? $_->{lib} : "[]".$_->{lib};
|
||||||
$x =~ s|(\.EXE)|$1/SHARE|;
|
$x =~ s|(\.EXE)|$1/SHARE|;
|
||||||
$x =~ s|(\.OLB)|$1/LIB|;
|
$x =~ s|(\.OLB)|$1/LIB|;
|
||||||
"WRITE OPT_FILE \"$x\"" } @deps)
|
"WRITE OPT_FILE \"$x\"" } @deps)
|
||||||
@ -1015,7 +1019,7 @@ EOF
|
|||||||
grep { platform->isdef($_) }
|
grep { platform->isdef($_) }
|
||||||
@{$args{objs}};
|
@{$args{objs}};
|
||||||
my @deps = compute_lib_depends(@{$args{deps}});
|
my @deps = compute_lib_depends(@{$args{deps}});
|
||||||
my $deps = join(", -\n\t\t", @objs, @defs, @deps);
|
my $deps = join(", -\n\t\t", @objs, @defs, map { $_->{lib} } @deps);
|
||||||
die "More than one symbol vector" if scalar @defs > 1;
|
die "More than one symbol vector" if scalar @defs > 1;
|
||||||
my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
|
my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
|
||||||
# The "[]" hack is because in .OPT files, each line inherits the
|
# The "[]" hack is because in .OPT files, each line inherits the
|
||||||
@ -1027,7 +1031,8 @@ EOF
|
|||||||
"WRITE OPT_FILE \"$x" } @objs).
|
"WRITE OPT_FILE \"$x" } @objs).
|
||||||
"\"";
|
"\"";
|
||||||
my $write_opt2 =
|
my $write_opt2 =
|
||||||
join("\n\t", map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
|
join("\n\t", map { my $x = $_->{lib} =~ /\[/
|
||||||
|
? $_->{lib} : "[]".$_->{lib};
|
||||||
$x =~ s|(\.EXE)|$1/SHARE|;
|
$x =~ s|(\.EXE)|$1/SHARE|;
|
||||||
$x =~ s|(\.OLB)|$1/LIB|;
|
$x =~ s|(\.OLB)|$1/LIB|;
|
||||||
"WRITE OPT_FILE \"$x\"" } @deps)
|
"WRITE OPT_FILE \"$x\"" } @deps)
|
||||||
@ -1071,9 +1076,9 @@ EOF
|
|||||||
@{$args{objs}};
|
@{$args{objs}};
|
||||||
my $objs = join(",", @objs);
|
my $objs = join(",", @objs);
|
||||||
my @deps = compute_lib_depends(@{$args{deps}});
|
my @deps = compute_lib_depends(@{$args{deps}});
|
||||||
my $deps = join(", -\n\t\t", @objs, @deps);
|
my $deps = join(", -\n\t\t", @objs, map { $_->{lib} } @deps);
|
||||||
|
|
||||||
my $olb_count = scalar grep(m|\.OLB$|, @deps);
|
my $olb_count = scalar grep(m|\.OLB$|, map { $_->{lib} } @deps);
|
||||||
my $analyse_objs = "@ !";
|
my $analyse_objs = "@ !";
|
||||||
if ($olb_count > 0) {
|
if ($olb_count > 0) {
|
||||||
my $analyse_quals =
|
my $analyse_quals =
|
||||||
@ -1089,16 +1094,24 @@ EOF
|
|||||||
"\@ WRITE OPT_FILE \"$x" } @objs).
|
"\@ WRITE OPT_FILE \"$x" } @objs).
|
||||||
"\"";
|
"\"";
|
||||||
my $write_opt2 =
|
my $write_opt2 =
|
||||||
join("\n\t", map { my @lines = (
|
join("\n\t", "WRITE OPT_FILE \"CASE_SENSITIVE=YES\"",
|
||||||
"\ WRITE OPT_FILE \"CASE_SENSITIVE=YES\""
|
map { my @lines = ();
|
||||||
);
|
use Data::Dumper;
|
||||||
my $x = $_ =~ /\[/ ? $_ : "[]".$_;
|
print STDERR "DEBUG: ",Dumper($_);
|
||||||
|
my $x = $_->{lib} =~ /\[/
|
||||||
|
? $_->{lib} : "[]".$_->{lib};
|
||||||
|
print STDERR "DEBUG: ",Dumper($x);
|
||||||
if ($x =~ m|\.EXE$|) {
|
if ($x =~ m|\.EXE$|) {
|
||||||
push @lines, "\@ WRITE OPT_FILE \"$x/SHARE\"";
|
push @lines, "\@ WRITE OPT_FILE \"$x/SHARE\"";
|
||||||
} elsif ($x =~ m|\.OLB$|) {
|
} elsif ($x =~ m|\.OLB$|) {
|
||||||
(my $l = $x) =~ s/\W/_/g;
|
# Special hack to include the MAIN object
|
||||||
|
# module explicitly. This will only be done
|
||||||
|
# if there isn't a 'main' in the program's
|
||||||
|
# object modules already.
|
||||||
|
my $main = $_->{attrs}->{has_main}
|
||||||
|
? '/INCLUDE=main' : '';
|
||||||
push @lines,
|
push @lines,
|
||||||
"\@ IF nomain THEN WRITE OPT_FILE \"$x/LIB\$(INCLUDE_MAIN_$l)\"",
|
"\@ IF nomain THEN WRITE OPT_FILE \"$x/LIB$main\"",
|
||||||
"\@ IF .NOT. nomain THEN WRITE OPT_FILE \"$x/LIB\""
|
"\@ IF .NOT. nomain THEN WRITE OPT_FILE \"$x/LIB\""
|
||||||
}
|
}
|
||||||
@lines
|
@lines
|
||||||
|
@ -9,7 +9,7 @@ SUBDIRS=ossl_shim
|
|||||||
""
|
""
|
||||||
-}
|
-}
|
||||||
IF[{- !$disabled{tests} -}]
|
IF[{- !$disabled{tests} -}]
|
||||||
LIBS{noinst}=libtestutil.a
|
LIBS{noinst,has_main}=libtestutil.a
|
||||||
SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output_helpers.c \
|
SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output_helpers.c \
|
||||||
testutil/driver.c testutil/tests.c testutil/cb.c testutil/stanza.c \
|
testutil/driver.c testutil/tests.c testutil/cb.c testutil/stanza.c \
|
||||||
testutil/format_output.c testutil/tap_bio.c \
|
testutil/format_output.c testutil/tap_bio.c \
|
||||||
@ -17,13 +17,6 @@ IF[{- !$disabled{tests} -}]
|
|||||||
INCLUDE[libtestutil.a]=../include
|
INCLUDE[libtestutil.a]=../include
|
||||||
DEPEND[libtestutil.a]=../libcrypto
|
DEPEND[libtestutil.a]=../libcrypto
|
||||||
|
|
||||||
# Special hack for descrip.mms to include the MAIN object module
|
|
||||||
# explicitly. This will only be done if there isn't a 'main' in the
|
|
||||||
# program's object modules already.
|
|
||||||
BEGINRAW[descrip.mms]
|
|
||||||
INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=main
|
|
||||||
ENDRAW[descrip.mms]
|
|
||||||
|
|
||||||
PROGRAMS{noinst}=\
|
PROGRAMS{noinst}=\
|
||||||
versions \
|
versions \
|
||||||
aborttest test_test \
|
aborttest test_test \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user