Browse Source

TAGS: new Makefile target.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell 13 years ago
parent
commit
fdc7a4c95d
2 changed files with 6 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 5 0
      Makefile

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
+TAGS
 .depends
 .depends
 *.d
 *.d
 *.o
 *.o

+ 5 - 0
Makefile

@@ -122,6 +122,11 @@ inter-depends: $(ALL_DEPENDS) Makefile
 test-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 > $@
 	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!
 # Ensure we don't end up with empty file if configurator fails!
 config.h: tools/configurator/configurator Makefile Makefile-ccan
 config.h: tools/configurator/configurator Makefile Makefile-ccan
 	tools/configurator/configurator $(CC) $(CCAN_CFLAGS) > $@ || rm -f $@
 	tools/configurator/configurator $(CC) $(CCAN_CFLAGS) > $@ || rm -f $@