From e3db66c5d6baaf298b8449aaff25478b9814d246 Mon Sep 17 00:00:00 2001 From: j8takagi Date: Sun, 21 Apr 2013 17:50:54 +0900 Subject: [PATCH] =?utf8?q?make=E3=81=ABdoc=5Finner-clean=E3=82=BF=E3=83=BC?= =?utf8?q?=E3=82=B2=E3=83=83=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile | 10 +++++----- doc_inner/Makefile | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) 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) -- 2.18.0