[Patch] skipping import libraries for performance reasons - direct auto-import of dll's

Ralf Habacker Ralf.Habacker@freenet.de
Tue Nov 26 15:51:00 GMT 2002


> > Just run GNU indent.  It defaults to the GNU coding standard anyhow.
> > Or read the standard at
> >     http://www.gnu.org/prep/standards_23.html#SEC23
>
> Almost.
>
> You still need to provide GNU indent with a list of typedefs (e.g.,
> `bfd').  The script ../gdb/gdb_indent.sh does this (using brute force).
>
Thanks for this hints. I think such a script in the main binutils dir would save
time especially for people, who does not provide a patch every day as I do.

I've taken a look into this script and it seems to me, that this could be
expanded to other dirs like bfd, ld and other. There are only two places to
patch (see below)
Does anyone have an idea how to build additional rules for other dirs ?


$ cat gdb/gdb_indent.sh
<snip>
# Check that we're in the GDB source directory

case `pwd` in
    */gdb ) ;;
    */sim/* ) ;;
<<<<< add other dirs >>>>>>>
    * ) echo "Not in GDB directory" 1>&2 ; exit 1 ;;
esac


<<<<< add other types depending of the directory >>>>>>>>

# Run indent per GDB specs

types="-T FILE `cat *.h | sed -n \
    -e 's/^.*[^a-z0-9_]\([a-z0-9_]*_ftype\).*$/-T \1/p' \
    -e 's/^.*[^a-z0-9_]\([a-z0-9_]*_func\).*$/-T \1/p' \
    -e 's/^typedef.*[^a-zA-Z0-9_]\([a-zA-Z0-9_]*[a-zA-Z0-9_]\);$/-T \1/p' \
    | sort -u`"

${indent} ${types} "$@"


BTW: This script need to be less stricter in recognizing proper indent versions
because it only works with gnu indent 2.2.6

Ralf



More information about the Binutils mailing list