From: Andrew Cagney Date: Mon, 13 Jan 2003 23:07:07 +0000 (+0000) Subject: 2003-01-13 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f5a30162c0ed12d2167d3f5371f2893777893fb;p=binutils-gdb.git 2003-01-13 Andrew Cagney * gdb_indent.sh: Update to version 2.2.9. Warn when not exact version match. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 82d63fddf17..bfb822e5946 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-01-13 Andrew Cagney + + * gdb_indent.sh: Update to version 2.2.9. Warn when not exact + version match. + 2003-01-13 Daniel Jacobowitz * symtab.c (find_pc_sect_line): Don't consider end-of-function diff --git a/gdb/gdb_indent.sh b/gdb/gdb_indent.sh index c47ef95828d..b2661380a35 100755 --- a/gdb/gdb_indent.sh +++ b/gdb/gdb_indent.sh @@ -36,12 +36,29 @@ fi # Check that the indent found is both GNU and a reasonable version. # Different indent versions give different indentation. -case `${indent} --version 2>/dev/null < /dev/null` in - GNU*2.2* ) ;; - *GNU* ) echo "Incorrect version of GNU indent" 1>&2 ;; - * ) echo "Indent is not GNU" 1>&2 ;; +m1=2 +m2=2 +m3=9 + +version=`${indent} --version 2>/dev/null < /dev/null` +case "${version}" in + *GNU* ) ;; + * ) echo "error: GNU indent $m1.$m2.$m3 expected" 1>&2 ; exit 1;; esac +v1=`echo "${version}" | sed 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)$/\1/'` +v2=`echo "${version}" | sed 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)$/\2/'` +v3=`echo "${version}" | sed 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)$/\3/'` + +if test $m1 -ne $v1 -o $m2 -ne $v2 -o $m3 -gt $v3 +then + echo "error: Must be GNU indent version $m1.$m2.$m3 or later" 1>&2 + exit 1 +fi +if test $m3 -ne $v3 +then + echo "warning: GNU indent version $m1.$m2.$m3 recommended" 1>&2 +fi # Check that we're in the GDB source directory