$details = "Test dynamic loading of modules.";
# Don't do anything if this system doesn't support "load"
-exists $FEATURES{load} or return -1;
+exists $FEATURES{'load'} or return -1;
my $cc = get_config('CC');
if (! $cc) {
int plugin_is_GPL_compatible;
+int testload_gmk_setup (gmk_floc *);
+int explicit_setup (gmk_floc *);
+
int
testload_gmk_setup (gmk_floc *pos)
{
# Make sure we can compile
-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 $cppflags = get_config('CPPFLAGS') . ($srcdir ? " -I$srcdir/src" : '');
+my $cflags = get_config('CFLAGS') . ' -fPIC';
+my $ldflags = get_config('LDFLAGS') . ' -shared';
+my $sobuild = "$cc $cppflags $cflags $ldflags -o testload.so testload.c";
my $clog = `$sobuild 2>&1`;
if ($? != 0) {
- $verbose and print "Failed to build testload.so:\n$sobuild\n$_";
+ $verbose and print "Failed to build testload.so:\n$sobuild\n$clog";
return -1;
}
my $makecopy = File::Spec->catfile($TEMPDIR, "make");
copy("$mkpath", $makecopy);
# Set file mode bits, because perl copy won't.
-chmod 0750, $makecopy;
+chmod 0700, $makecopy;
my @make_orig = @make_command;
@make_command = ($makecopy);
run_make_test("
include bye.mk
all:; \$(info hello)
-\$(MAKE_RESTARTS)bye.mk: force; touch \$@ && chmod -x $makecopy
+\$(MAKE_RESTARTS)bye.mk: force; touch \$@ && chmod u-x $makecopy
force:
",
- "-f-", "touch bye.mk && chmod -x $makecopy\nmake: $makecopy: $ERR_nonexe_file\n", 32512);
+ "-f-", "touch bye.mk && chmod u-x $makecopy\nmake: $makecopy: $ERR_nonexe_file\n", 32512);
@make_command = @make_orig;
unlink($makecopy);