Makefile: fixed rule TAGS
authorAlexandre Bique <alexandre.bique@citrix.com>
Fri, 7 Aug 2009 14:43:11 +0000 (15:43 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 24 Aug 2009 13:01:41 +0000 (08:01 -0500)
- still works if the build dir is not the src dir
- use find instead of *.c block/*.c etc...

Signed-off-by: Alexandre Bique <alexandre.bique@citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Makefile

index f6bdf84..e595cb5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -244,8 +244,9 @@ endif
 test speed: all
        $(MAKE) -C tests $@
 
+.PHONY: TAGS
 TAGS:
-       etags *.[ch] tests/*.[ch] block/*.[ch] hw/*.[ch]
+       find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
 
 cscope:
        rm -f ./cscope.*