1 .PHONY: all clean doxygen-clean gnu_global-clean cmetrics-clean
16 DOXYGEN_DIR := doxygen
18 GNU_GLOBAL_DIR := gnu_global
19 GNU_GLOBAL_SRCDIR := ..
20 CMETRICS_DIR := cmetrics
21 CMETRICS_SRCDIR := ../src
23 # chk_file_ext: 指定されたファイルが実在する場合、エラー
24 # 用例: $(call chk_cmd_ext,cmd,target)
26 $(if $(strip $(shell $(WHICH) $1)),$2,,@$(ECHO) '$1: not found')
29 all: $(call chk_cmd_ext,$(DOXYGEN),$(DOXYGEN_DIR)) $(call chk_cmd_ext,$(HTAGS),$(GNU_GLOBAL_DIR)) $(call chk_cmd_ext $(CMETRICS),$(CMETRICS_DIR))
31 # doxygenのHTMLドキュメント作成先は、
32 # ../Doxyfileで設定された以下のディレクトリーの下のhtmlディレクトリー
33 # OUTPUT_DIRECTORY = doc_inner
34 $(DOXYGEN_DIR): $(DOXYSRCDIR)/Doxyfile ../src ../include
35 $(INSTALL) -d $(DOXYGEN_DIR)
36 $(CD) $(DOXYSRCDIR) && $(DOXYGEN)
38 $(DOXYSRCDIR)/Doxyfile:
39 $(CP) -f Doxyfile $(DOXYSRCDIR)/
41 # htagsのHTMLドキュメント作成先は、
42 # 引数DIRで指定されたディレクトリーの下のHTMLディレクトリー
43 $(GNU_GLOBAL_DIR): ../src ../include
44 $(MAKE) -C $(GNU_GLOBAL_SRCDIR) gtags
45 $(CD) $(GNU_GLOBAL_SRCDIR) && $(HTAGS) -anosx $(CURDIR) && $(RMR) $(CURDIR)/$@ && $(MV) $(CURDIR)/HTML $(CURDIR)/$@
48 $(INSTALL) -d $(CMETRICS_DIR)
49 $(CMETRICS) $(CMETRICS_SRCDIR) | $(SED) -e '1s/ \{2,\}/\t/g' -e '2,$$s/ \{1,\}/\t/g' >$(CMETRICS_DIR)/files.tsv
50 $(CMETRICS) -f $(CMETRICS_SRCDIR) | $(SED) -e '1s/ \{2,\}/\t/g' -e '2,$$s/ \{1,\}/\t/g' >$(CMETRICS_DIR)/functions.tsv
52 clean: doxygen-clean gnu_global-clean cmetrics-clean
59 $(RMR) $(GNU_GLOBAL_DIR)
62 $(RMR) $(CMETRICS_DIR)