From: j8takagi Date: Thu, 25 Oct 2012 14:48:15 +0000 (+0900) Subject: Makefileで、必要なコマンドがない場合の動作を修正 X-Git-Tag: v0.1p50~3 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87f036b3d45181aa7a0905c2c003416786c84ea8;p=YACASL2.git Makefileで、必要なコマンドがない場合の動作を修正 --- diff --git a/Makefile b/Makefile index 4969245..3d29329 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ GTAGS ?= gtags RMF ?= rm -f WHICH ?= which +ECHO ?= echo all: build doc doc_inner @@ -10,7 +11,7 @@ build: $(MAKE) -C src gtags: - ($(WHICH) $(GTAGS) && $(GTAGS)) >/dev/null + $(WHICH) $(GTAGS) && $(GTAGS) >/dev/null || $(ECHO) "$(GTAGS): not found" check: $(MAKE) -C test/system diff --git a/doc_inner/Makefile b/doc_inner/Makefile index 5c59ef2..ac2414a 100644 --- a/doc_inner/Makefile +++ b/doc_inner/Makefile @@ -7,6 +7,7 @@ HTAGS ?= htags RMRF ?= rm -rf PWD ?= pwd WHICH ?= which +ECHO ?= echo DOXYGEN_DIR := doxygen GNU_GLOBAL_DIR := gnu_global @@ -17,13 +18,13 @@ all: $(DOXYGEN_DIR) $(GNU_GLOBAL_DIR) # ../Doxyfileで設定された以下のディレクトリーの下のhtmlディレクトリー # OUTPUT_DIRECTORY = doc_inner $(DOXYGEN_DIR): ../Doxyfile - ($(WHICH) $(DOXYGEN) && $(CD) .. && $(DOXYGEN) && $(CD) - && $(MV) html $@) >/dev/null + $(WHICH) $(DOXYGEN) && ($(CD) .. && $(DOXYGEN) && $(CD) - && $(MV) html $@) >/dev/null || $(ECHO) "$(DOXYGEN): not found" # htagsのHTMLドキュメント作成先は、 # 引数DIRで指定されたディレクトリーの下のHTMLディレクトリー $(GNU_GLOBAL_DIR): $(MAKE) -C .. gtags - ($(WHICH) $(HTAGS) && $(CD) .. && $(HTAGS) -anosx doc_inner && $(CD) - && $(MV) HTML $@) >/dev/null + $(WHICH) $(HTAGS) && ($(CD) .. && $(HTAGS) -anosx doc_inner && $(CD) - && $(MV) HTML $@) >/dev/null || $(ECHO) "$(HTAGS): not found" clean: clean_doxygen clean_gnu_global