diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-02-01 14:37:21 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-02-01 14:37:21 +0000 |
commit | eb1f8df73c921226b177e96f1b82371e5ad0d13d (patch) | |
tree | c72cbe4eeeb305d5257f1a93468be7886922ced2 /make_ext.pl | |
parent | ca5de986dd6a53bf639708f4ed28e2bdeb1b3aa8 (diff) | |
download | perl-eb1f8df73c921226b177e96f1b82371e5ad0d13d.tar.gz |
Replacing system $scalar with system @list requires splitting $MAKE on spaces.
Diffstat (limited to 'make_ext.pl')
-rw-r--r-- | make_ext.pl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/make_ext.pl b/make_ext.pl index fb4399cba7..422d5806c8 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -75,7 +75,10 @@ unless(defined $makecmd and $makecmd =~ /^MAKE=(.*)$/) { die "$0: WARNING: Please include MAKE=\$(MAKE) in \@ARGV\n"; } -my $make = $1 || $Config{make} || $ENV{MAKE}; +# This isn't going to cope with anything fancy, such as spaces inside command +# names, but neither did what it replaced. Once there is a use case that needs +# it, please supply patches. Until then, I'm sticking to KISS +my @make = split ' ', $1 || $Config{make} || $ENV{MAKE}; # Using an array of 0 or 1 elements makes the subsequent code simpler. my @run = $Config{run}; @run = () if not defined $run[0] or $run[0] eq ''; @@ -161,12 +164,12 @@ sub build_extension { cd $ext_dir if test ! -f Makefile -a -f Makefile.old; then echo "Note: Using Makefile.old" - make -f Makefile.old $clean_target MAKE=$make @pass_through + make -f Makefile.old $clean_target MAKE='@make' @pass_through else if test ! -f Makefile ; then echo "Warning: No Makefile!" fi - make $clean_target MAKE=$make @pass_through + make $clean_target MAKE='@make' @pass_through fi cd $return_dir EOS @@ -182,10 +185,10 @@ EOS if (!$target or $target !~ /clean$/) { # Give makefile an opportunity to rewrite itself. # reassure users that life goes on... - my @config = (@run, $make, 'config', @$pass_through); + my @config = (@run, @make, 'config', @$pass_through); system @config and print "@config failed, continuing anyway...\n"; } - my @targ = (@run, $make, $target, @$pass_through); + my @targ = (@run, @make, $target, @$pass_through); print "Making $target in $ext_dir\n@targ\n"; my $code = system @targ; die "Unsuccessful make($ext_dir): code=$code" if $code != 0; |