Enhance shell.
[pintos-anon] / src / Makefile
index 72b234a1312739b7d8dafaf735409f6fde5e3012..c781a028d9b97b89e2bd178b7f66b5d7c219e17f 100644 (file)
@@ -1,10 +1,20 @@
+SUBDIRS = threads userprog vm filesys
+
 all::
-       @echo "Run 'make' in the threads, userprog, filesys, or vm directory."
+       @echo "Run 'make' in subdirectories $(SUBDIRS)."
        @echo "This top-level make has only 'clean' targets."
 
 clean::
-       for d in threads; do $(MAKE) -C $$d $@; done
+       for d in $(SUBDIRS) tests; do $(MAKE) -C $$d $@; done
 
-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)
+