This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid to run config_h.SH twice during configuration.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 16 Feb 2007 10:30:57 +0000 (10:30 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 16 Feb 2007 10:30:57 +0000 (10:30 +0000)
p4raw-id: //depot/perl@30327

cflags.SH
config_h.SH

index 8acb57d..fe4bacc 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -17,8 +17,9 @@ case "$0" in
 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
 esac
 
-if ! test -f config.h; then
+if test -f config_h.SH && ! test -f config.h; then
     . ./config_h.SH
+    CONFIG_H=already-done
 fi
 
 warn=''
index bb951ac..e9c9d6d 100644 (file)
@@ -20,8 +20,11 @@ esac
 case "$0" in
 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
 esac
-echo "Extracting $CONFIG_H (with variable substitutions)"
-sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
+case "$CONFIG_H" in
+already-done) echo "Not re-extracting config.h" ;;
+*)
+    echo "Extracting $CONFIG_H (with variable substitutions)"
+    sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
 /*
  * This file was produced by running the config_h.SH script, which
  * gets its values from $CONFIG_SH, which is generally produced by
@@ -4485,3 +4488,5 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
 
 #endif
 !GROK!THIS!
+    ;;
+esac