qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [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
* [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

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-12  2:57 [Qemu-devel] [PATCH] Fix TAGS creation David Gibson
2013-03-15  6:15 ` Markus Armbruster
2013-03-19  1:32   ` David Gibson
2013-03-19  1:38 ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2013-03-07  2:48 David Gibson
2013-03-07  7:29 ` Markus Armbruster
2013-03-19  1:38 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).