This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
#27362 broke HP-UX (and others). if [[ ... ]] syntax not supported
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 3 Mar 2006 07:34:03 +0000 (07:34 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 3 Mar 2006 07:34:03 +0000 (07:34 +0000)
p4raw-id: //depot/metaconfig@27366

U/modified/Cppsym.U

index af68c9e..03343cc 100644 (file)
@@ -224,18 +224,20 @@ chmod +x Cppsym.try
 $eunicefix Cppsym.try
 ./Cppsym < Cppsym.know > Cppsym.true
 : Add in any linux cpp "predefined macros":
-if [[ "$osname" == *linux* ]] && [[ "$gccversion" != "" ]]; then
-  tHdrH=_tmpHdr
-  rm -f $tHdrH'.h' $tHdrH
-  touch $tHdrH'.h'
-  if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
-     sed 's/#define[\ \  ]*//;s/[\ \     ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
-     if [ -s $tHdrH'_cppsym.real' ]; then
-       cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
-     fi
-  fi
-  rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
-fi
+case "$osname::$gccversion" in
+  *linux*::*.*)
+    tHdrH=_tmpHdr
+    rm -f $tHdrH'.h' $tHdrH
+    touch $tHdrH'.h'
+    if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
+       sed 's/#define[\ \  ]*//;s/[\ \     ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
+       if [ -s $tHdrH'_cppsym.real' ]; then
+         cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
+       fi
+    fi
+    rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
+  ;;
+esac
 : now check the C compiler for additional symbols
 ?X: suggested by Jarkko Hietaniemi <jhi@snakemail.hut.fi>, thanks!
 postprocess_cc_v=''