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: [RFA] Make contrib/ari/gdb_find.sh script more configurable


>     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.

I am personally not very fond of environment variables in general,
but I see that the script passes all arguments straight through to
the find command, so we can't add new switches...

I do note, however, that the script is really only ever called with
one argument in practice, so we could simplify the problem if we
wanted to.

Just my 2 cents:
  - for gdbserver, I assume we will make it non-optional at some point.
  - For gnulib, I think it is pointless. I do not see why we'd start
    generating ARI info for some source code that we do not control.
  - for gdbtk, why not, although I don't know that the gdbtk is
    very active beyond minimal maintenance...

> 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.

I think the entry presents the environment variable names as entities
in your code. I don't know how to present changes to the "main" of
a script. I'd probably write a free-txt description of the changes
and see if I get away with it.

        * contrib/ari/gdb_find.sh: Check the "check_gdbtk_dir",
        "check_gdbserver_dir", and "check_gnulib_dir" environment
        variables to determine which directories should get pruned.

Or something like that.

-- 
Joel

PS: One of the issues I have with the current scripts is that they are
    pretty abstract. They were most likely written to handle several
    projects, with GDB being just one of them. Now that the scripts
    are inside the GDB repository, I'd enjoy some simplications in
    that department (Eg: delete variable "project", and just inline
    "gdb" everywhere - it seems like it would make the code a little
    easier to understand).


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