From: j8takagi Date: Wed, 13 Feb 2013 13:36:21 +0000 (+0900) Subject: doc-innerのMakefileを整理 X-Git-Tag: v0.2p9~3 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85df2ded4d5734d032d7556d2804cf1e4d058003;p=YACASL2.git doc-innerのMakefileを整理 cmetricsに関する設定の整理 Doxygenの設定ファイルをdoc-innerに移動 --- diff --git a/Doxyfile b/doc_inner/Doxyfile similarity index 100% rename from Doxyfile rename to doc_inner/Doxyfile diff --git a/doc_inner/Makefile b/doc_inner/Makefile index 289b214..e8b8903 100644 --- a/doc_inner/Makefile +++ b/doc_inner/Makefile @@ -1,46 +1,55 @@ -.PHONY: all clean doxygen-clean gnu_global-clean +.PHONY: all clean doxygen-clean gnu_global-clean cmetrics-clean CD := cd CMETRICS := cmetrics +CP := cp DOXYGEN := doxygen ECHO := echo HTAGS := htags INSTALL := install MAKE := make MV := mv -RMRF := rm -rf +RMR := rm -rf +SED := sed WHICH := which DOXYGEN_DIR := doxygen +DOXYSRCDIR := .. GNU_GLOBAL_DIR := gnu_global +GNU_GLOBAL_SRCDIR := .. CMETRICS_DIR := cmetrics +CMETRICS_SRCDIR := ../src all: $(DOXYGEN_DIR) $(GNU_GLOBAL_DIR) $(CMETRICS_DIR) # doxygenのHTMLドキュメント作成先は、 # ../Doxyfileで設定された以下のディレクトリーの下のhtmlディレクトリー # OUTPUT_DIRECTORY = doc_inner -$(DOXYGEN_DIR): ../Doxyfile - $(if $(strip $(shell $(WHICH) $(DOXYGEN))),$(CD) .. && $(DOXYGEN) && $(MV) $(CURDIR)/html $(CURDIR)/$@,$(ECHO) '$(DOXYGEN): not found') +$(DOXYGEN_DIR): $(DOXYSRCDIR)/Doxyfile + $(if $(strip $(shell $(WHICH) $(DOXYGEN))),$(CD) $(DOXYSRCDIR) && $(DOXYGEN) && $(MV) $(CURDIR)/html $(CURDIR)/$@,$(ECHO) '$(DOXYGEN): not found') + +$(DOXYSRCDIR)/Doxyfile: + $(CP) -f Doxyfile $(DOXYSRCDIR)/ # htagsのHTMLドキュメント作成先は、 # 引数DIRで指定されたディレクトリーの下のHTMLディレクトリー $(GNU_GLOBAL_DIR): - $(MAKE) -C .. gtags - $(if $(strip $(shell $(WHICH) $(HTAGS))),$(CD) .. && $(HTAGS) -anosx $(CURDIR) && $(MV) $(CURDIR)/HTML $(CURDIR)/$@,@$(ECHO) '$(HTAGS): not found') + $(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') $(CMETRICS_DIR): $(INSTALL) -d $(CMETRICS_DIR) - $(CMETRICS) ../src | sed -e 's/ */\t/g' >$(CMETRICS_DIR)/files.tsv - $(CMETRICS) -f ../src | sed -e 's/ */\t/g' >$(CMETRICS_DIR)/functions.tsv + $(CMETRICS) $(CMETRICS_SRCDIR) | $(SED) -e '1s/ \{2,\}/\t/g' -e '2,$$s/ \{1,\}/\t/g' >$(CMETRICS_DIR)/files.tsv + $(CMETRICS) -f $(CMETRICS_SRCDIR) | $(SED) -e '1s/ \{2,\}/\t/g' -e '2,$$s/ \{1,\}/\t/g' >$(CMETRICS_DIR)/functions.tsv -clean: doxygen-clean gnu_global-clean +clean: doxygen-clean gnu_global-clean cmetrics-clean doxygen-clean: - @$(RMRF) $(DOXYGEN_DIR) + $(RMR) $(DOXYGEN_DIR) + $(RM) ../Doxyfile gnu_global-clean: - @$(RMRF) $(GNU_GLOBAL_DIR) + $(RMR) $(GNU_GLOBAL_DIR) cmetrics-clean: - @$(RMRF) $(CMETRICS_DIR) + $(RMR) $(CMETRICS_DIR)