All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix TAGS creation
@ 2013-03-07  2:48 David Gibson
  2013-03-07  7:29 ` Markus Armbruster
  2013-03-19  1:38 ` Anthony Liguori
  0 siblings, 2 replies; 7+ messages in thread
From: David Gibson @ 2013-03-07  2:48 UTC (permalink / raw)
  To: aliguori; +Cc: qemu-devel, David Gibson

Currently the Makefile creates TAGS for emacs with the command:
    find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
That works only if xargs ends up invoking etags just once.  If xargs runs
etags several times, as it will if there are enough files, then the later
invocations will overwrite the output from the earlier invocations.  This
patch uses the etags --append option to fix the bug.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2262410..bb576da 100644
--- a/Makefile
+++ b/Makefile
@@ -331,7 +331,8 @@ test speed: all
 
 .PHONY: TAGS
 TAGS:
-	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
+	rm -f $@
+	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags --append
 
 cscope:
 	rm -f ./cscope.*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix TAGS creation
  2013-03-07  2:48 [Qemu-devel] [PATCH] Fix TAGS creation David Gibson
@ 2013-03-07  7:29 ` Markus Armbruster
  2013-03-19  1:38 ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Armbruster @ 2013-03-07  7:29 UTC (permalink / raw)
  To: David Gibson; +Cc: aliguori, qemu-devel

David Gibson <david@gibson.dropbear.id.au> writes:

> Currently the Makefile creates TAGS for emacs with the command:
>     find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
> That works only if xargs ends up invoking etags just once.  If xargs runs
> etags several times, as it will if there are enough files, then the later
> invocations will overwrite the output from the earlier invocations.  This
> patch uses the etags --append option to fix the bug.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  Makefile |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 2262410..bb576da 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -331,7 +331,8 @@ test speed: all
>  
>  .PHONY: TAGS
>  TAGS:
> -	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
> +	rm -f $@
> +	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags --append
>  
>  cscope:
>  	rm -f ./cscope.*

Slightly more portable:

    find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix TAGS creation
  2013-03-07  2:48 [Qemu-devel] [PATCH] Fix TAGS creation David Gibson
  2013-03-07  7:29 ` Markus Armbruster
@ 2013-03-19  1:38 ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2013-03-19  1:38 UTC (permalink / raw)
  To: David Gibson, aliguori; +Cc: qemu-devel

Applied.  Thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix TAGS creation
  2013-03-12  2:57 David Gibson
  2013-03-15  6:15 ` Markus Armbruster
@ 2013-03-19  1:38 ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2013-03-19  1:38 UTC (permalink / raw)
  To: David Gibson, aliguori; +Cc: armbru, qemu-devel

Applied.  Thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix TAGS creation
  2013-03-15  6:15 ` Markus Armbruster
@ 2013-03-19  1:32   ` David Gibson
  0 siblings, 0 replies; 7+ messages in thread
From: David Gibson @ 2013-03-19  1:32 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: aliguori, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

On Fri, Mar 15, 2013 at 07:15:52AM +0100, Markus Armbruster wrote:
> David Gibson <david@gibson.dropbear.id.au> writes:
> 
> > Currently the Makefile creates TAGS for emacs with the command:
> >     find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
> > That works only if xargs ends up invoking etags just once.  If xargs runs
> > etags several times, as it will if there are enough files, then the later
> > invocations will overwrite the output from the earlier invocations.  This
> > patch uses the etags --append option to fix the bug.
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> 
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Anyone? Anyone?  Please apply?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix TAGS creation
  2013-03-12  2:57 David Gibson
@ 2013-03-15  6:15 ` Markus Armbruster
  2013-03-19  1:32   ` David Gibson
  2013-03-19  1:38 ` Anthony Liguori
  1 sibling, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2013-03-15  6:15 UTC (permalink / raw)
  To: David Gibson; +Cc: aliguori, qemu-devel

David Gibson <david@gibson.dropbear.id.au> writes:

> Currently the Makefile creates TAGS for emacs with the command:
>     find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
> That works only if xargs ends up invoking etags just once.  If xargs runs
> etags several times, as it will if there are enough files, then the later
> invocations will overwrite the output from the earlier invocations.  This
> patch uses the etags --append option to fix the bug.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Reviewed-by: Markus Armbruster <armbru@redhat.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH] Fix TAGS creation
@ 2013-03-12  2:57 David Gibson
  2013-03-15  6:15 ` Markus Armbruster
  2013-03-19  1:38 ` Anthony Liguori
  0 siblings, 2 replies; 7+ messages in thread
From: David Gibson @ 2013-03-12  2:57 UTC (permalink / raw)
  To: aliguori; +Cc: David Gibson, qemu-devel, armbru

Currently the Makefile creates TAGS for emacs with the command:
    find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
That works only if xargs ends up invoking etags just once.  If xargs runs
etags several times, as it will if there are enough files, then the later
invocations will overwrite the output from the earlier invocations.  This
patch uses the etags --append option to fix the bug.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

---
v2: Improved portability based on suggest from Markus Armbruster.
---
 Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 12c7662..6915178 100644
--- a/Makefile
+++ b/Makefile
@@ -334,7 +334,8 @@ test speed: all
 
 .PHONY: TAGS
 TAGS:
-	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
+	rm -f $@
+	find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
 
 cscope:
 	rm -f ./cscope.*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-19  1:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-07  2:48 [Qemu-devel] [PATCH] Fix TAGS creation David Gibson
2013-03-07  7:29 ` Markus Armbruster
2013-03-19  1:38 ` Anthony Liguori
2013-03-12  2:57 David Gibson
2013-03-15  6:15 ` Markus Armbruster
2013-03-19  1:32   ` David Gibson
2013-03-19  1:38 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.