Clean TAGS, tags targets.
[pintos-anon] / src / Makefile
index 90c36af421eaa8af9e1ba016920c02552dfcca4a..326e774ae0347fae11dd941a403fc1b80b977555 100644 (file)
@@ -6,13 +6,16 @@ all::
 
 clean::
        for d in $(SUBDIRS) tests; do $(MAKE) -C $$d $@; done
+       rm -f TAGS tags
 
 distclean:: clean
        find . -name '*~' -exec rm '{}' \;
 
+TAGS_SOURCES = `find \( -name tests -o -name build \) -prune -o -name \*.[chS] -print`
+
 TAGS::
-       etags --members *.[chS] `find $(SUBDIRS) -name \*.[chS]`
+       etags --members $(TAGS_SOURCES)
 
 tags::
-       ctags -T *.[chS] `find . -name \*.[chS]`
+       ctags -T --no-warn $(TAGS_SOURCES)