cflags also runs under /bin/sh so can't use $()
authorNicholas Clark <nick@ccl4.org>
Wed, 31 Dec 2008 07:30:24 +0000 (23:30 -0800)
committerDavid Mitchell <davem@iabyn.com>
Mon, 30 Mar 2009 19:17:30 +0000 (20:17 +0100)
(cherry picked from commit 5f589954180c59496f647c8523dcd3df0d8e579b)

cflags.SH

index 132f466..80b50b1 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -297,11 +297,11 @@ for file do
     opmini) ;;
     pad) ;;
     perl) 
-        if [ -f .patchnum -a -n "$(awk 'BEGIN{ORS=""} /describe:/ {print $1}' .patchnum)" ] ; then
-                ccflags="-DPERL_PATCHNUM=$(awk 'BEGIN{ORS=""} /describe:/ {print $2}' .patchnum) $ccflags"
+        if [ -f .patchnum -a -n "`awk 'BEGIN{ORS=""} /describe:/ {print $1}' .patchnum`" ] ; then
+                ccflags="-DPERL_PATCHNUM=`awk 'BEGIN{ORS=""} /describe:/ {print $2}' .patchnum` $ccflags"
         fi
-       if [ -f .patchnum -a -n "$(awk 'BEGIN{ORS=""} /status:/ {print $2}' .patchnum)" ] ; then
-                ccflags="-DPERL_GIT_UNCOMMITTED_CHANGES=$(awk 'BEGIN{ORS=""} /status:/ {print $2}' .patchnum) $ccflags"
+       if [ -f .patchnum -a -n "`awk 'BEGIN{ORS=""} /status:/ {print $2}' .patchnum`" ] ; then
+                ccflags="-DPERL_GIT_UNCOMMITTED_CHANGES=`awk 'BEGIN{ORS=""} /status:/ {print $2}' .patchnum` $ccflags"
        fi
         ;;
     perlapi) ;;