This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Archive-Extract to CPAN version 0.68
[perl5.git] / Porting / config_h.pl
index 7c1deec..0042526 100755 (executable)
@@ -3,7 +3,10 @@
 # This script reorders config_h.SH after metaconfig
 # Changing metaconfig is too complicated
 #
-# Copyright (C) 2005-2005 by H.Merijn Brand (m)'05 [25-05-2005]
+# This script is run just after metaconfig, and it
+# is run ONLY ONCE. Not to be used afterwards
+#
+# Copyright (C) 2005-2012 by H.Merijn Brand (m)'12 [22-09-2012]
 #
 # You may distribute under the terms of either the GNU General Public
 # License or the Artistic License, as specified in the README file.
@@ -55,6 +58,27 @@ do {
        }
     } while ($changed);
 
+# 30327
+for (grep m{echo .Extracting \$CONFIG_H} => @ch) {
+    my $case = join "\n",
+       qq{case "\$CONFIG_H" in},
+       qq{already-done) echo "Not re-extracting config.h" ;;},
+       qq{*)}, "";
+    s{^(?=echo .Extracting)}{$case}m;
+    }
+push @ch, ";;\nesac\n";
+
+
 open  $ch, "> $cSH" or die "Cannot write $cSH: $!\n";
+print $ch <<EOW;
+#!/bin/sh
+#
+# THIS IS A GENERATED FILE
+# DO NOT HAND-EDIT
+#
+# See Porting/config_h.pl
+
+EOW
+
 print $ch @ch;
 close $ch;