mirror of
https://github.com/mirror/make.git
synced 2026-08-22 18:03:27 +08:00
tests: Convert %CONFIG_FLAGS to get_config()
* tests/config-flags.pm.W32: Create a predefined Windows file. * Makefile.am (test_FILES): Add it to the distribution. * build_w32.bat: Install tests/config-flags.pm if not existing. * tests/run_make_tests.pl (get_config): Create new function. * tests/scripts/features/archives: Call get_config() rather than using %CONFIG_FLAGS directly. * tests/scripts/features/load: Ditto. * tests/scripts/features/loadapi: Ditto. * tests/scripts/functions/wildcard: Ditto.
This commit is contained in:
@@ -6,8 +6,8 @@ $details = "Test dynamic loading of modules.";
|
||||
# Don't do anything if this system doesn't support "load"
|
||||
exists $FEATURES{load} or return -1;
|
||||
|
||||
# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
|
||||
if (! exists $CONFIG_FLAGS{CC}) {
|
||||
my $cc = get_config('CC');
|
||||
if (! $cc) {
|
||||
$verbose and print "Skipping load test: no CC defined\n";
|
||||
return -1;
|
||||
}
|
||||
@@ -46,7 +46,10 @@ close($F) or die "close: testload.c: $!\n";
|
||||
|
||||
# Make sure we can compile
|
||||
|
||||
my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testload.so testload.c";
|
||||
my $cflags = get_config('CFLAGS');
|
||||
my $cppflags = get_config('CPPFLAGS');
|
||||
my $ldflags = get_config('LDFLAGS');
|
||||
my $sobuild = "$cc ".($srcdir? "-I$srcdir/src":'')." $cppflags $cflags -shared -fPIC $ldflags -o testload.so testload.c";
|
||||
|
||||
my $clog = `$sobuild 2>&1`;
|
||||
if ($? != 0) {
|
||||
|
||||
Reference in New Issue
Block a user