From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4118 invoked by alias); 12 Dec 2012 12:05:36 -0000 Received: (qmail 4102 invoked by uid 22791); 12 Dec 2012 12:05:35 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_BT,TW_DB X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Dec 2012 12:05:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 854702E471; Wed, 12 Dec 2012 07:05:29 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2x-p-1ifkQ9D; Wed, 12 Dec 2012 07:05:29 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 12E8A2E1B7; Wed, 12 Dec 2012 07:05:28 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 04A08C1506; Wed, 12 Dec 2012 16:05:22 +0400 (RET) Date: Wed, 12 Dec 2012 12:05:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Make contrib/ari/gdb_find.sh script more configurable Message-ID: <20121212120522.GU31477@adacore.com> References: <001501cdd79f$a5a94c00$f0fbe400$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001501cdd79f$a5a94c00$f0fbe400$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00382.txt.bz2 > 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 > > * 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).