Clean TAGS, tags targets.
[pintos-anon] / src / Makefile
index 9242a7a1ce6757bb9dffc202389c3551c2da00a3..326e774ae0347fae11dd941a403fc1b80b977555 100644 (file)
@@ -1,12 +1,21 @@
-SUBDIRS = threads filesys
+SUBDIRS = threads userprog vm filesys
 
 all::
        @echo "Run 'make' in subdirectories $(SUBDIRS)."
        @echo "This top-level make has only 'clean' targets."
 
 clean::
-       for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
+       for d in $(SUBDIRS) tests; do $(MAKE) -C $$d $@; done
+       rm -f TAGS tags
 
-distclean::
-       $(MAKE) clean
+distclean:: clean
        find . -name '*~' -exec rm '{}' \;
+
+TAGS_SOURCES = `find \( -name tests -o -name build \) -prune -o -name \*.[chS] -print`
+
+TAGS::
+       etags --members $(TAGS_SOURCES)
+
+tags::
+       ctags -T --no-warn $(TAGS_SOURCES)
+