WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [RFC] build: use xargs in conjunction with etags

To: Horms <horms@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC] build: use xargs in conjunction with etags
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Fri, 23 Jun 2006 16:56:41 +0200
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 23 Jun 2006 07:57:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060623083241.GA9323@xxxxxxxxxxxx> (horms@xxxxxxxxxxxx's message of "Fri, 23 Jun 2006 17:32:43 +0900")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060623083241.GA9323@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Horms <horms@xxxxxxxxxxxx> writes:

> The existing etags invocation does not seem to work for me,
> but using xargs in the same way that it is used for crats does.
> I'm pretty sure that is because on Debian etags == ctags,
> does anyone have etags lying around to test if this works?
>
> Also, I'm pretty sure this xargs approach will break for both ctags
> and etags if there are too many files to for one command line,
> as ctags/etags will be invoked multiple times, and the resulting
> tags file will only contain the tags for the last invocation.
>
> Signed-Off-By: Horms <horms@xxxxxxxxxxxx>
> --- x/xen/Makefile
> +++ x/xen/Makefile
> @@ -132,7 +136,7 @@ endef
>  
>  .PHONY: _TAGS
>  _TAGS: 
> -     $(all_sources) | etags -
> +     $(all_sources) | xargs etags

When xargs invokes etags more than once (i.e. it's actually needed),
each invocation will clobber the output of the previous one.  To run
etags on an arbitrarily long file list, try something like

    rm -f TAGS && $(all_sources) | xargs etags -a

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel