diff --git a/autoconf_share/assay b/autoconf_share/assay index e21114464bf9aea988e6d6fa5226e2e4c5b6004d..f0844c8e7e8c458a9378f69204ccd20177be7dd6 100755 --- a/autoconf_share/assay +++ b/autoconf_share/assay @@ -303,8 +303,8 @@ EOF # Not fully equal, check if equal except for numbers. # Replace for this purpose all numbers by x. - sed -e 's/[+-]\?\(\(\([0-9]\+\)\|\([0-9]*\.\?[0-9]*\)\)\(e[+-]\?[0-9]\+\)\?\)/x/g' ${PROG}_tmp.out > ${PROG}_tmp.out2 - sed -e 's/[+-]\?\(\(\([0-9]\+\)\|\([0-9]*\.\?[0-9]*\)\)\(e[+-]\?[0-9]\+\)\?\)/x/g' ${PROG}_tmp_orig.out > ${PROG}_tmp_orig.out2 + sed -e 's/[+-]\?\(\(\([0-9][0-9]*\)\|\([0-9]*\.\?[0-9]*\)\)\(e[+-]\?[0-9][0-9]*\)\?\)/x/g' ${PROG}_tmp.out > ${PROG}_tmp.out2 + sed -e 's/[+-]\?\(\(\([0-9][0-9]*\)\|\([0-9]*\.\?[0-9]*\)\)\(e[+-]\?[0-9][0-9]*\)\?\)/x/g' ${PROG}_tmp_orig.out > ${PROG}_tmp_orig.out2 diff ${PROG}_tmp.out2 ${PROG}_tmp_orig.out2 > /dev/null 2>&1 diff ${PROG}_tmp.out2 ${PROG}_tmp_orig.out2 > /dev/null 2>&1 if [ $? != 0 ] diff --git a/autoconf_share/bootstrap b/autoconf_share/bootstrap index 05b83c6c89e328b7d2b1e7c18ad5ef2934aff174..0d6666c19b79e4ff7306764278ff522143850651 100755 --- a/autoconf_share/bootstrap +++ b/autoconf_share/bootstrap @@ -66,7 +66,7 @@ if [ $lfr_lofarconf = 1 ]; then cd $subdir > /dev/null # suppress possible cd output if [ ! -r bootstrap ]; then # Add an extra ../ to the autoconf_share paths. - lfr_back=`echo $subdir | sed -e "s%/[^/]\+%/..%g" -e "s%^[^/]\+%..%"` + lfr_back=`echo $subdir | sed -e "s%/[^/][^/]*%/..%g" -e "s%^[^/][^/]*%..%"` sed -e s%autoconf%$lfr_back/autoconf%g $lfr_back/bootstrap > bootstrap chmod +x bootstrap fi diff --git a/autoconf_share/checkfloat b/autoconf_share/checkfloat index 955788e95a52284b92316520b82f48538a550561..f77267dbb20a0f5377b82e4655fe190eb46411ac 100755 --- a/autoconf_share/checkfloat +++ b/autoconf_share/checkfloat @@ -23,8 +23,8 @@ # First replace all non-numeric characters and single e.+- by a blank. # Insert a blank if a - or + is preceeded by a digit. # Replace blanks by a newline. - sed -e 's/[^-+.e0-9]/ /g' $1 | sed -e 's/\(^\| \)[e.+-]\+\( \|$\)//g' | sed -e 's/^ \+//' -e 's/ \+$//' -e 's/\([0-9.]\)\([+-]\)/\1 \2/g' -e 's/ \+/\n/g' > /tmp/$pid.checkfloat_tmp.1 - sed -e 's/[^-+.e0-9]/ /g' $2 | sed -e 's/\(^\| \)[e.+-]\+\( \|$\)//g' | sed -e 's/^ \+//' -e 's/ \+$//' -e 's/\([0-9.]\)\([+-]\)/\1 \2/g' -e 's/ \+/\n/g' > /tmp/$pid.checkfloat_tmp.2 + sed -e 's/[^-+.e0-9]/ /g' $1 | sed -e 's/\(^\| \)[e.+-][e.+-]*\( \|$\)//g' | sed -e 's/^ *//' -e 's/ *$//' -e 's/\([0-9.]\)\([+-]\)/\1 \2/g' -e 's/ */\n/g' > /tmp/$pid.checkfloat_tmp.1 + sed -e 's/[^-+.e0-9]/ /g' $2 | sed -e 's/\(^\| \)[e.+-][e.+-]*\( \|$\)//g' | sed -e 's/^ *//' -e 's/ *$//' -e 's/\([0-9.]\)\([+-]\)/\1 \2/g' -e 's/ */\n/g' > /tmp/$pid.checkfloat_tmp.2 # Show the differences column-wise. diff -y --suppress-common-lines /tmp/$pid.checkfloat_tmp.1 /tmp/$pid.checkfloat_tmp.2 > /tmp/$pid.checkfloat_tmp.diff diff --git a/autoconf_share/lofarconf b/autoconf_share/lofarconf index bb6f7043da4dc74fc6ec5eec8371fa3904749b1c..2b54124cd66d240ec48dfcb981c85133a466da8a 100755 --- a/autoconf_share/lofarconf +++ b/autoconf_share/lofarconf @@ -79,7 +79,7 @@ fi # Get the default install directory. # It is the root of the build tree followed by installed/variant. -lfr_back=`echo $lfr_pkg | sed -e "s%/[^/]\+%/..%g" -e "s%^[^/]\+%..%"` +lfr_back=`echo $lfr_pkg | sed -e "s%/[^/][^/]*%/..%g" -e "s%^[^/][^/]*%..%"` lfr_install=`cd ../../$lfr_back && pwd` lfr_install=$lfr_install/installed/$lfr_cvdir diff --git a/autoconf_share/lofarconf_subst b/autoconf_share/lofarconf_subst index 21bf1dfa88623d334ccb12d2d4228409fc1f2eb0..2f04e65fff6758bb4585f38b9654c98753575f51 100755 --- a/autoconf_share/lofarconf_subst +++ b/autoconf_share/lofarconf_subst @@ -47,14 +47,14 @@ do fi # First test if a variable is defined. # Exit the loop if no more variables. - a1=`echo "$opts" | sed -e 's/\$([^) ]\+)//'` + a1=`echo "$opts" | sed -e 's/\$([^) ][^) ]*)//'` if [ "$opts" = "$a1" ]; then break; fi # Get the part before, the name and the part after. - r1=`echo "$opts" | sed -e 's/\(.*\)\$([^) ]\+).*/\1/'` - var=`echo "$opts" | sed -e 's/.*\$(\([^) ]\+\)).*/\1/'` - r2=`echo "$opts" | sed -e 's/.*\$([^) ]\+)\(.*\)/\1/'` + r1=`echo "$opts" | sed -e 's/\(.*\)\$([^) ][^) ]*).*/\1/'` + var=`echo "$opts" | sed -e 's/.*\$(\([^) ][^) ]*\)).*/\1/'` + r2=`echo "$opts" | sed -e 's/.*\$([^) ][^) ]*)\(.*\)/\1/'` # Try to find the variable in one of the variant files. varval=`egrep "^$lfr_cmp\.compiler\.$var\.var:" variants_local` if [ "x$varval" = "x" ]; then diff --git a/autoconf_share/profiletool b/autoconf_share/profiletool index c737b5ed56a70e6d9e90e2d1f1db445f10715dce..c9b962ae121bf6050d80ea222d21e5eebfff4c39 100755 --- a/autoconf_share/profiletool +++ b/autoconf_share/profiletool @@ -45,7 +45,7 @@ shift; # all profiling output goes into profile directory # find new name for this run # -alldirs=`ls -1 | grep "^$binname.profile.dir.[[:digit:]]\+$" | cut -d. -f4 | sort -n | tail -1`; +alldirs=`ls -1 | grep "^$binname.profile.dir.[0-9][0-9]*$" | cut -d. -f4 | sort -n | tail -1`; if test "$alldirs" = ""; then profdir="$binname.profile.dir.1"; else @@ -111,7 +111,7 @@ declare -i loopcount=0; while test \( $progpid -eq 0 \) -a \( $loopcount -lt 5 \); do sleep 1 # pstree -np $timepid 2> /dev/null - declare -i progpid=`pstree -np $timepid 2> /dev/null | sed -e "s/^.*$binname.*(\([[:digit:]]\+\)).*$/\1/"`; + declare -i progpid=`pstree -np $timepid 2> /dev/null | sed -e "s/^.*$binname.*(\([0-9][0-9]*\)).*$/\1/"`; loopcount=$loopcount+1; done