TAGS: new Makefile target.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 21 Nov 2012 23:38:53 +0000 (10:08 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 21 Nov 2012 23:38:53 +0000 (10:08 +1030)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
.gitignore
Makefile

index 57a114b3c2d63e5d306e4e50cbcc160d0020c89b..2cccc4531bd48ddfddc6b9b903237d49f3122c10 100644 (file)
@@ -1,3 +1,4 @@
+TAGS
 .depends
 *.d
 *.o
index 13aa195dd0e379187a34d5470d927177f89c7c13..0101fe0653b5601bb9c30888a99b57f1718fa799 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -122,6 +122,11 @@ inter-depends: $(ALL_DEPENDS) Makefile
 test-depends: $(ALL_DEPENDS) Makefile
        for f in $(ALL_DEPENDS); do echo check-`basename \`dirname $$f\``: `sed -n 's,ccan/\(.*\),check-\1,p' < $$f`; done > $@
 
+TAGS: FORCE
+       find * -name '*.[ch]' | xargs etags
+
+FORCE:
+
 # Ensure we don't end up with empty file if configurator fails!
 config.h: tools/configurator/configurator Makefile Makefile-ccan
        tools/configurator/configurator $(CC) $(CCAN_CFLAGS) > $@ || rm -f $@