exec.cの実行ルーチンを関数ポインタでの記述に変更し、整理
[YACASL2.git] / Makefile
index 5a4b7a2..ccc16d7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,38 @@
-.PHONY: build check doc clean
+.PHONY: build check doc doxygen clean gtags htags
+MKDIR = mkdir -p
+DOXYGEN = doxygen
+GTAGS = gtags
+HTAGS = htags
+HTAGSFLAG = --map-file -anosx --tree-view
 
 build:
-       make -C src
+       $(MAKE) -C src
 
 check:
-       @make -sC test/system
+       @$(MAKE) -sC test/system
 
 doc:
-       @make -sC doc
+       @$(MAKE) -sC doc
+
+doxygen: htags
+       @$(DOXYGEN)
+
+gtags:
+       @$(GTAGS)
+
+htags: doc/doxygen/html gtags
+       @$(HTAGS) $(HTAGSFLAG) $</
+
+doc/doxygen/html:
+       @$(MKDIR) $@
 
 clean:
-       @for target in src test/integration test/unit as/casl2lib; do $(MAKE) -sC $$target clean; done;
+       @$(MAKE) -sC src clean
+       @$(MAKE) -sC test/system/casl2 clean
+       @$(MAKE) -sC test/system/comet2 clean
+       @$(MAKE) -sC test/system/dumpword clean
+       @$(MAKE) -sC test/unit clean
+       @rm -rf doc/doxygen/*
        @rm -f casl2 comet2 dumpword
+       @rm -f GPATH GRTAGS GSYMS GTAGS
+       @rm -rf HTML