This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit] Fix fnchange.lst


> Date: Sun, 20 Sep 2009 20:46:53 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: gdb-patches@sourceware.org
> 
> > I don't think you'll have write priviledges. If you want, I can add
> > your key to the authorized_keys, or I can commit the changes for you.
> 
> The latter would be more than enough.  I will see if I can find time
> to craft a script that you wanted.

Here you go.  Save as "chkfnames" and invoke it like this:

    srcdir=FOO tmpdir=BAR ./chkfnames

It will produce the list of problematic files on stdout, together with
the reasons for their inclusion.  tmpdir is used to create an Awk
script that filters out files already renamed by fnchange.lst; you can
remove that script when you are done.

Enjoy.


--------------------------------------
#!/bin/sh

fnchange_lst="${srcdir}"/gdb/config/djgpp/fnchange.lst
fnchange_awk="${tmpdir}"/fnchange.awk

# Transform fnchange.lst into fnchange.awk.  The program DJTAR
# does a textual substitution of each file name using the list.
# Generate an awk script that does the equivalent - matches an
# exact line and then outputs the replacement.

sed -e 's;@[^@]*@[/]*\([^ ]*\) @[^@]*@[/]*\([^ ]*\);\$0 == "\1" { print "\2"\; next\; };' \
    < "${fnchange_lst}" > "${fnchange_awk}"
echo '{ print }' >> "${fnchange_awk}"

( cd "${srcdir}" && find * \
    -name '*.info-[0-9]*' -prune \
    -o -name tcl -prune \
    -o -name itcl -prune \
    -o -name tk -prune \
    -o -name libgui -prune \
    -o -name tix -prune \
    -o -name dejagnu -prune \
    -o -name expect -prune \
    -o -type f -print ) \
| awk -f ${fnchange_awk} | doschk | sed '/The following file names are too long for SysV:/q' | fgrep -v 'The following file names are too long for SysV:'

exit 0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]