a) It does not make Makefile.PL a prerequisite for Makefile if the
file is not actually present.
This way one can run
perl -MExtUtils::MakeMaker -wle "WriteMakefile NAME => 'dummy'" \
&& make test
to test distributions sitting in subdirectories of the given directory.
b) When testing files in subdirectories, no attention to the value of
$(FIRST_MAKEFILE) was given; now we start make as
cd ...; make -f $(FIRST_MAKEFILE) test
c) `make test' was running `make test' in subdirectories as a sequence
of Make commands.
cd dir1; make test
cd dir2; make test
cd dir3; make test
After the first offence, no further tests were run - even if make
was run with -k option. Now we generate many different dependencies
subdir-test ::
cd dir1; make test
subdir-test ::
cd dir2; make test
subdir-test ::
cd dir3; make test
so that the things should not be fixed one directory per run.
Enjoy,
Ilya
--- ./lib/ExtUtils/MM_Unix.pm-pre Sat Nov 8 13:07:26 2003
+++ ./lib/ExtUtils/MM_Unix.pm Sun Dec 14 23:10:14 2003
@@ -2972,7 +2972,7 @@ $(FIRST_MAKEFILE) : Makefile.PL $(CONFIG
$(NOECHO) $(ECHO) "==> Please rerun the make command. <=="
false
-};
+} if -f 'Makefile.PL';
join "", @m;
}
@@ -3823,6 +3823,7 @@ sub test {
}
# note: 'test.pl' name is also hardcoded in init_dirscan()
my(@m);
+ my $subdirs_test = ($self->{DIR} && @{$self->{DIR}} ? 'subdirs-test' : '');
push(@m,"
TEST_VERBOSE=0
TEST_TYPE=test_\$(LINKTYPE)
@@ -3832,14 +3833,14 @@ TESTDB_SW = -d
testdb :: testdb_\$(LINKTYPE)
-test :: \$(TEST_TYPE)
+test :: \$(TEST_TYPE) $subdirs_test
");
if ($Is_Win95) {
- push(@m, map(qq{\t\$(NOECHO) \$(PERLRUN) -e "exit unless -f shift; chdir '$_'; system q{\$(MAKE) test \$(PASTHRU)}" \$(FIRST_MAKEFILE)\n}, @{$self->{DIR}}));
+ push(@m, map(qq{\nsubdirs-test ::\n\t\$(NOECHO) \$(PERLRUN) -e "exit unless -f shift; chdir '$_'; system q{\$(MAKE) -f \$(FIRST_MAKEFILE) test \$(PASTHRU)}" \$(FIRST_MAKEFILE)\n}, @{$self->{DIR}}));
}
else {
- push(@m, map("\t\$(NOECHO) cd $_ && \$(TEST_F) \$(FIRST_MAKEFILE) && \$(MAKE) test \$(PASTHRU)\n", @{$self->{DIR}}));
+ push(@m, map("\nsubdirs-test ::\n\t\$(NOECHO) cd $_ && \$(TEST_F) \$(FIRST_MAKEFILE) && \$(MAKE) -f \$(FIRST_MAKEFILE) test \$(PASTHRU)\n", @{$self->{DIR}}));
}
push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n")