Maintainers.pl: bump Term::ANSIColor version
[p5sagit/p5-mst-13.2.git] / Porting / makerel
index 390b92b..b126164 100644 (file)
 # Tim Bunce, June 1997
 
 use ExtUtils::Manifest qw(fullcheck);
+$ExtUtils::Manifest::Quiet = 1;
+use Getopt::Std;
 
 $|=1;
-$relroot = "..";       # XXX make an option
+
+sub usage { die <<EOF; }
+usage: $0 [ -r rootdir ] [-s suffix ]
+    -r rootdir   directory under which to create the build dir and tarball
+                 defaults to '..'
+    -s suffix    suffix to append to to the perl-x.y.z dir and tarball name
+                defaults to the concatenaion of the local_patches entry
+                in patchlevel.h (or blank, if none)
+EOF
+
+my %opts;
+getopts('r:s:', \%opts) or usage;
+@ARGV && usage;
+
+$relroot = defined $opts{r} ? $opts{r} : "..";
 
 die "Must be in root of the perl source tree.\n"
        unless -f "./MANIFEST" and -f "patchlevel.h";
@@ -37,12 +53,16 @@ $lpatch_tags   = join "-", @lpatch_tags;
 
 $perl = "perl-$vers";
 $reldir = "$perl";
+
+$lpatch_tags = $opts{s} if defined $opts{s};
 $reldir .= "-$lpatch_tags" if $lpatch_tags;
 
 print "\nMaking a release for $perl in $relroot/$reldir\n\n";
 
 print "Cross-checking the MANIFEST...\n";
 ($missfile, $missentry) = fullcheck();
+@$missentry
+    = grep {$_ !~ m!^\.git/! and $_ !~ m!(?:/|^)\.gitignore!} @$missentry;
 warn "Can't make a release with MANIFEST files missing.\n" if @$missfile;
 warn "Can't make a release with files not listed in MANIFEST.\n" if @$missentry;
 if ("@$missentry" =~ m/\.orig\b/) {
@@ -95,8 +115,6 @@ my @exe = qw(
     Porting/findrfuncs
     Porting/genlog
     Porting/makerel
-    Porting/p4genpatch
-    Porting/patchls
     Porting/*.pl
     mpeix/nm
     mpeix/relink
@@ -120,9 +138,6 @@ my @writables = qw(
     global.sym
     overload.c
     overload.h
-    pod/perlintern.pod
-    pod/perlapi.pod
-    pod/perltoc.pod
     perlapi.h
     perlapi.c
     ext/Devel-PPPort/module2.c