From patchwork Fri Jan 3 13:24:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 3431381 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B6A26C02DC for ; Fri, 3 Jan 2014 13:37:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5316120149 for ; Fri, 3 Jan 2014 13:37:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4E1520035 for ; Fri, 3 Jan 2014 13:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751252AbaACNhR (ORCPT ); Fri, 3 Jan 2014 08:37:17 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58425 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbaACNhP (ORCPT ); Fri, 3 Jan 2014 08:37:15 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DECA3AAD1; Fri, 3 Jan 2014 13:37:14 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id 1C76C406F0; Fri, 3 Jan 2014 14:24:32 +0100 (CET) Date: Fri, 3 Jan 2014 14:24:32 +0100 From: mmarek To: Steven Rostedt Cc: Stephen Boyd , Andrew Morton , Geert Uytterhoeven , LKML , linux-kbuild , Yang Bai Subject: Re: [PATCH] scripts: Have make TAGS not include structure members Message-ID: <20140103132432.GA32469@sepie.suse.cz> References: <20131115093645.6dc03918@gandalf.local.home> <20131119155907.11fbdecea0aa40764a3d927a@linux-foundation.org> <20131119190426.27b010e4@gandalf.local.home> <20131119160855.2527630f87d060801d9ee3bb@linux-foundation.org> <20131119191435.4dce1499@gandalf.local.home> <528BFFBF.4050807@codeaurora.org> <20131119193414.48912cbd@gandalf.local.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20131119193414.48912cbd@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Nov 19, 2013 at 07:34:14PM -0500, Steven Rostedt wrote: > I wasn't going to use this change, but instead add this change: [...] > --- linux-trace.git.orig/scripts/tags.sh 2013-11-19 19:29:34.352371615 -0500 > +++ linux-trace.git/scripts/tags.sh 2013-11-19 19:32:37.821152204 -0500 > @@ -218,7 +218,7 @@ exuberant() > > emacs() > { > - all_target_sources | xargs $1 -a \ > + all_target_sources | xargs $@ -a \ > --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \ > --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ > --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ > @@ -263,7 +263,7 @@ xtags() > if $1 --version 2>&1 | grep -iq exuberant; then > exuberant $1 > elif $1 --version 2>&1 | grep -iq emacs; then > - emacs $1 > + emacs $@ > else > all_target_sources | xargs $1 -a > fi > @@ -313,7 +313,7 @@ case "$1" in > > "TAGS") > rm -f TAGS > - xtags etags > + xtags etags --no-members > remove_structs=y The logic looks OK, but it is not completely obvious that $@ means 'etags --no-members, iff called as etags'. How about using a more descriptive variable like this? Michal --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/tags.sh b/scripts/tags.sh index 58c4559..3afc479 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -219,7 +219,7 @@ exuberant() emacs() { - all_target_sources | xargs $1 -a \ + all_target_sources | xargs $1 $no_members -a \ --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \ --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ @@ -308,12 +308,15 @@ case "$1" in "tags") rm -f tags + no_members= xtags ctags remove_structs=y ;; "TAGS") rm -f TAGS + # Do not index struct members when generating Emacs TAGS + no_members=--no-members xtags etags remove_structs=y ;;