3 # Try to find a GNU indent. There could be a BSD indent in front of a
4 # GNU gindent so when indent is found, keep looking.
8 paths
=`echo $PATH | sed \
15 if test ! -n "${gindent}" -a -x ${path}/gindent
17 gindent
=${path}/gindent
19 elif test ! -n "${indent}" -a -x ${path}/indent
25 if test -n "${gindent}"
28 elif test -n "${indent}"
32 echo "Indent not found" 1>&2
36 # Check that the indent found is both GNU and a reasonable version.
37 # Different indent versions give different indentation.
39 case `${indent} --version 2>/dev/null < /dev/null` in
41 *GNU
* ) echo "Incorrect version of GNU indent" 1>&2 ;;
42 * ) echo "Indent is not GNU" 1>&2 ;;
46 # Check that we're in the GDB source directory
51 * ) echo "Not in GDB directory" 1>&2 ; exit 1 ;;
55 # Run indent per GDB specs
59 -T prgregset_t -T fpregset_t -T gregset_t \
61 -e 's/^.*[^a-z0-9_]\([a-z0-9_]*_ftype\).*$/-T \1/p' \
62 -e 's/^.*[^a-z0-9_]\([a-z0-9_]*_func\).*$/-T \1/p' \
63 -e 's/^typedef.*[^a-zA-Z0-9_]\([a-zA-Z0-9_]*[a-zA-Z0-9_]\);$/-T \1/p' \
66 ${indent} ${types} "$@"
This page took 0.030063 seconds and 4 git commands to generate.