anything.
This is intended to work for about 90% of packages with a test suite. If it
-doesn't work, you're encoruaged to skip using dh_auto_test at all, and
+doesn't work, you're encouraged to skip using dh_auto_test at all, and
just run the test suite manually.
=head1 OPTIONS
init();
if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
+ $ENV{MAKE}="make" unless exists $ENV{MAKE};
foreach my $target (qw{test check}) {
- my $ret=system("make --question $target >/dev/null 2>&1");
- if ($ret == 0) {
- doit(exists $ENV{MAKE} ? $ENV{MAKE} : "make",
- $target, @{$dh{U_PARAMS}});
+ # Use make -n to check to see if the target would do
+ # anything. There's no good way to test if a target exists.
+ my $ret=`$ENV{MAKE} -s -n $target 2>/dev/null`;
+ chomp $ret;
+ if (length $ret) {
+ doit($ENV{MAKE}, $target, @{$dh{U_PARAMS}});
last;
}
}
}
+elsif (-e "Build.PL" && -e "Build") {
+ doit(qw/perl Build test/, @{$dh{U_PARAMS}});
+}
=head1 SEE ALSO