summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Maischein <corion@corion.net>2013-10-05 20:01:44 +0200
committerMax Maischein <corion@corion.net>2013-10-06 19:48:09 +0200
commit160daab816e76fa4243218cc3aace68f382c8e9a (patch)
treef17d4b167352e6f2496f643b5ab030c449903d9f
parentcd9a17141adacfdd66e379334b50b7516d4f2cec (diff)
downloadperl-160daab816e76fa4243218cc3aace68f382c8e9a.tar.gz
Run correct make
Use Config.pm to determine correct kind of `make` tool For Windows, the make process is supposed to get kicked off in ./Win32. We now run `make test-prep` before trying the module self-tests
-rwxr-xr-xPorting/sync-with-cpan15
1 files changed, 13 insertions, 2 deletions
diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan
index fc6515078e..a0a26d68f3 100755
--- a/Porting/sync-with-cpan
+++ b/Porting/sync-with-cpan
@@ -130,6 +130,7 @@ use Getopt::Long;
use Archive::Tar;
use File::Path qw( remove_tree );
use File::Find;
+use Config qw( %Config );
$| = 1;
@@ -184,6 +185,16 @@ sub de_exec {
}
sub make {
+ my @args= @_;
+ if( $^O eq 'MSWin32') {
+ chdir "Win32";
+ system "$Config{make} @args> ..\\make.log 2>&1" and die "Running make failed, see make.log";
+ chdir '..';
+ } else {
+ system "$Config{make} @args> make.log 2>&1" and die "Running make failed, see make.log";
+ };
+};
+
my ($module) = shift;
my $cpan_mod = @ARGV ? shift : $module;
@@ -433,7 +444,8 @@ if (@commit) {
print "Running a make ... ";
-system "$Config{make} > make.log 2>&1" and die "Running make failed, see make.log";
+# Prepare for running (selected) tests
+make 'test-prep';
print "done\n";
#
@@ -445,7 +457,6 @@ print "About to clean up; hit return or abort (^C) "; <STDIN>;
remove_tree( "cpan/$old_dir" );
unlink "cpan/$new_file" unless $tarball;
-
#
# Run the tests. First the test belonging to the module, followed by the
# the tests in t/porting