This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make_ext.pl should validate exactly which clean targets it can be used for.
authorNicholas Clark <nick@ccl4.org>
Thu, 27 Feb 2014 09:20:38 +0000 (10:20 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 2 Mar 2014 06:08:54 +0000 (07:08 +0100)
Previously it would accept anything matching /clean$/. Now we check for the 4
names that we know the top level Makefile defines.

make_ext.pl

index 98ed3cc..0c877fc 100644 (file)
@@ -124,7 +124,7 @@ my @make = split ' ', $1 || $Config{make} || $ENV{MAKE};
 
 if ($target eq '') {
     die "make_ext: no make target specified (eg all or clean)\n";
 
 if ($target eq '') {
     die "make_ext: no make target specified (eg all or clean)\n";
-} elsif ($target !~ /(?:^all|clean)$/) {
+} elsif ($target !~ /^(?:all|clean|distclean|realclean|veryclean)$/) {
     # for the time being we are strict about what make_ext is used for
     die "$0: unknown make target '$target'\n";
 }
     # for the time being we are strict about what make_ext is used for
     die "$0: unknown make target '$target'\n";
 }