More Chip patches:
[p5sagit/p5-mst-13.2.git] / Porting / makerel
index 21bac1e..f719a5e 100644 (file)
@@ -2,7 +2,6 @@
 
 # A first attempt at some automated support for making a perl release.
 # Very basic but functional - if you're on a unix system.
-# You should have at least run preprel before this.
 #
 # No matter how automated this gets, you'll always need to read
 # and re-read pumpkin.pod checking for things to be done at various
@@ -28,19 +27,30 @@ $vers.= sprintf( "_%02d", $subversion) if $subversion;
 
 $perl = "perl$vers";
 $reldir = "$relroot/$perl";
+$reldir .= "-$ARGV[0]" if $ARGV[0];
 
 print "\nMaking a release for $perl in $reldir\n\n";
 
 
 print "Cross-checking the MANIFEST...\n";
 ($missfile, $missentry) = fullcheck();
-die "Can't make a release with MANIFEST files missing.\n" if @$missfile;
-die "Can't make a release with files not listed in MANIFEST.\n" if @$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/) {
+    # Handy listing of find command and .orig files from patching work.
+    # I tend to run 'xargs rm' and copy and paste the file list.
+    my $cmd = "find . -name '*.orig' -print";
+    print "$cmd\n";
+    system($cmd);
+}
+die "Aborted.\n" if @$missentry or @$missfile;
 print "\n";
 
 
 print "Setting file permissions...\n";
-system("find . -type f -print | xargs chmod -w");
+system("find . -type f -print     | xargs chmod -w");
+system("find . -type d -print     | xargs chmod g-s");
+system("find t -name '*.t' -print | xargs chmod +x");
 system("chmod +w configure"); # special case (see pumpkin.pod)
 @exe = qw(
     Configure
@@ -69,7 +79,7 @@ print "\n";
 
 print "Creating $reldir release directory...\n";
 die "$reldir release directory already exists\n"   if -e "../$perl";
-die "$reldir.tar.gz release file already exists\n" if -e "../$perl.tar.gz";
+die "$reldir.tar.gz release file already exists\n" if -e "../$reldir.tar.gz";
 mkdir($reldir, 0755) or die "mkdir $reldir: $!\n";
 print "\n";