This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: [Patch] skipping import libraries for performance reasons - direct auto-import of dll's
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: "Andrew Cagney" <ac131313 at redhat dot com>,"Ian Lance Taylor" <ian at airs dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Wed, 27 Nov 2002 00:51:32 +0100
- Subject: RE: [Patch] skipping import libraries for performance reasons - direct auto-import of dll's
> > 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