From: j8takagi Date: Sun, 21 Apr 2013 08:50:54 +0000 (+0900) Subject: makeにdoc_inner-cleanターゲットを追加 X-Git-Tag: v0.2p10~8 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3db66c5d6baaf298b8449aaff25478b9814d246;p=YACASL2.git makeにdoc_inner-cleanターゲットを追加 --- diff --git a/Makefile b/Makefile index ad22d42..7f9f0ea 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ .PHONY: all build gtags \ check \ - doc alldoc doc-inner \ + doc alldoc doc_inner \ install uninstall \ version gittag \ clean src-clean gtags-clean \ - test-clean doc-clean doc-inner-clean + test-clean doc-clean doc_inner-clean CMD := casl2 comet2 dumpword @@ -42,7 +42,7 @@ INSTALL: doc/install.txt alldoc: $(MAKE) -C doc all -doc-inner: +doc_inner: $(MAKE) -C doc_inner all check: @@ -66,7 +66,7 @@ gittag: VERSION distclean: cmd-clean gtags-clean version-clean clean -clean: src-clean doc-clean doc-inner-clean +clean: src-clean doc-clean doc_inner-clean cmd-clean: $(RM) $(CMD) @@ -80,7 +80,7 @@ gtags-clean: doc-clean: $(MAKE) -sC doc clean -doc-inner-clean: +doc_inner-clean: $(MAKE) -sC doc_inner clean version-clean: diff --git a/doc_inner/Makefile b/doc_inner/Makefile index e8b8903..68af59b 100644 --- a/doc_inner/Makefile +++ b/doc_inner/Makefile @@ -20,22 +20,29 @@ GNU_GLOBAL_SRCDIR := .. CMETRICS_DIR := cmetrics CMETRICS_SRCDIR := ../src -all: $(DOXYGEN_DIR) $(GNU_GLOBAL_DIR) $(CMETRICS_DIR) +# chk_file_ext: 指定されたファイルが実在する場合、エラー +# 用例: $(call chk_cmd_ext,cmd,target) +define chk_cmd_ext + $(if $(strip $(shell $(WHICH) $1)),$2,,@$(ECHO) '$1: not found') +endef + +all: $(call chk_cmd_ext,$(DOXYGEN),$(DOXYGEN_DIR)) $(call chk_cmd_ext,$(HTAGS),$(GNU_GLOBAL_DIR)) $(call chk_cmd_ext $(CMETRICS),$(CMETRICS_DIR)) # doxygenのHTMLドキュメント作成先は、 # ../Doxyfileで設定された以下のディレクトリーの下のhtmlディレクトリー # OUTPUT_DIRECTORY = doc_inner -$(DOXYGEN_DIR): $(DOXYSRCDIR)/Doxyfile - $(if $(strip $(shell $(WHICH) $(DOXYGEN))),$(CD) $(DOXYSRCDIR) && $(DOXYGEN) && $(MV) $(CURDIR)/html $(CURDIR)/$@,$(ECHO) '$(DOXYGEN): not found') +$(DOXYGEN_DIR): $(DOXYSRCDIR)/Doxyfile ../src ../include + $(INSTALL) -d $(DOXYGEN_DIR) + $(CD) $(DOXYSRCDIR) && $(DOXYGEN) $(DOXYSRCDIR)/Doxyfile: $(CP) -f Doxyfile $(DOXYSRCDIR)/ # htagsのHTMLドキュメント作成先は、 # 引数DIRで指定されたディレクトリーの下のHTMLディレクトリー -$(GNU_GLOBAL_DIR): +$(GNU_GLOBAL_DIR): ../src ../include $(MAKE) -C $(GNU_GLOBAL_SRCDIR) gtags - $(if $(strip $(shell $(WHICH) $(HTAGS))),$(CD) $(GNU_GLOBAL_SRCDIR) && $(HTAGS) -anosx $(CURDIR) && $(MV) $(CURDIR)/HTML $(CURDIR)/$@,@$(ECHO) '$(HTAGS): not found') + $(CD) $(GNU_GLOBAL_SRCDIR) && $(HTAGS) -anosx $(CURDIR) && $(RMR) $(CURDIR)/$@ && $(MV) $(CURDIR)/HTML $(CURDIR)/$@ $(CMETRICS_DIR): $(INSTALL) -d $(CMETRICS_DIR)