From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] Make contrib/ari/gdb_find.sh script more configurable
Date: Tue, 11 Dec 2012 13:01:00 -0000 [thread overview]
Message-ID: <001501cdd79f$a5a94c00$f0fbe400$@muller@ics-cnrs.unistra.fr> (raw)
As we were talking about adding
gdbserver to the list of directories that should
also be inspected by Awk regression scripts,
I propose hereby a patch allowing to include directory
gdbtk, gdbserver or gnulib to the list of inspected directories
by simply exporting a variable named check_XXX_dir
before running the scripts.
Does this look OK to you?
Is the ChangeLog entry OK?
Pierre Muller
as ARI maintainer
2012-12-11 Pierre Muller <muller@sourceware.org>
* contrib/ari/gdb_find.sh (add_pruned_directory): New function.
(check_gdbtk_dir, check_gdbserver_dir, check_gnulib_dir): Add
test for presence of variables to conditionally prune corresponding
directory.
Index: contrib/ari/gdb_find.sh
===================================================================
RCS file: /cvs/src/src/gdb/contrib/ari/gdb_find.sh,v
retrieving revision 1.5
diff -u -p -r1.5 gdb_find.sh
--- contrib/ari/gdb_find.sh 7 Dec 2012 02:57:49 -0000 1.5
+++ contrib/ari/gdb_find.sh 11 Dec 2012 12:54:56 -0000
@@ -29,11 +29,38 @@ LC_ALL=C ; export LC_ALL
# A find that prunes files that GDB users shouldn't be interested in.
# Use sort to order files alphabetically.
-find "$@" \
- -name testsuite -prune -o \
- -name gdbserver -prune -o \
- -name gdbtk -prune -o \
- -name gnulib -prune -o \
+find_args=
+
+add_pruned_directory ()
+{
+ pruned_dir=$1
+ if [ ! -z "$verbose" ] ; then
+ echo "Adding directory \"$pruned_dir\" to list of pruned directories"
+ fi
+ findargs="$findargs -name $pruned_dir -prune -o "
+}
+
+# Setting environment variables
+# check_gdbtk_dir, check_gdbserver_dir and check_gnulib_dir
+# to non empty will trigger the addition of the files contained
+# in directory gdbtk and gdbserver respectively.
+# By default, these directory are not listed.
+
+if [ -z "$check_gdbtk_dir" ] ; then
+ add_pruned_directory gdbtk
+fi
+
+if [ -z "$check_gdbserver_dir" ] ; then
+ add_pruned_directory gdbserver
+fi
+
+if [ -z "$check_gnulib_dir" ] ; then
+ add_pruned_directory gnulib
+fi
+
+add_pruned_directory testsuite
+
+find "$@" $findargs \
-name '*-stub.c' -prune -o \
-name '*-exp.c' -prune -o \
-name ada-lex.c -prune -o \
next reply other threads:[~2012-12-11 13:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 13:01 Pierre Muller [this message]
2012-12-12 12:05 ` Joel Brobecker
2012-12-12 12:39 ` Pedro Alves
[not found] <50c72eb9.c7f1440a.18e7.ffff89d4SMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-12 12:44 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001501cdd79f$a5a94c00$f0fbe400$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox