pintos: Avoid literal control character in Perl variable name.
[pintos-anon] / src / Makefile
index 9242a7a1ce6757bb9dffc202389c3551c2da00a3..229f85d1dcc3deb707c897033bc0327f10eddc4d 100644 (file)
@@ -1,12 +1,29 @@
-SUBDIRS = threads filesys
+BUILD_SUBDIRS = threads userprog vm filesys
 
 all::
-       @echo "Run 'make' in subdirectories $(SUBDIRS)."
+       @echo "Run 'make' in subdirectories: $(BUILD_SUBDIRS)."
        @echo "This top-level make has only 'clean' targets."
 
+CLEAN_SUBDIRS = $(BUILD_SUBDIRS) examples utils
+
 clean::
-       for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
+       for d in $(CLEAN_SUBDIRS); do $(MAKE) -C $$d $@; done
+       rm -f TAGS tags
 
-distclean::
-       $(MAKE) clean
+distclean:: clean
        find . -name '*~' -exec rm '{}' \;
+
+TAGS_SUBDIRS = $(BUILD_SUBDIRS) devices lib
+TAGS_SOURCES = find $(TAGS_SUBDIRS) -name \*.[chS] -print
+
+TAGS::
+       etags --members `$(TAGS_SOURCES)`
+
+tags::
+       ctags -T --no-warn `$(TAGS_SOURCES)`
+
+cscope.files::
+       $(TAGS_SOURCES) > cscope.files
+
+cscope:: cscope.files
+       cscope -b -q -k