Makefileメモ

Table of Contents

@の意味

“@” はコマンド行をエコーしない http://quwahara.hatenablog.com/entry/2012/02/13/201713

e.g.

.PHONY: common-style
common-style:
	@echo ">> checking code style"
	@fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \
	if [ -n "$${fmtRes}" ]; then \
		echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \
		echo "Please ensure you are using $$($(GO) version) for formatting code."; \
		exit 1; \
	fi

https://github.com/prometheus/prometheus/blob/master/Makefile.common

-の意味

“-” はその行のコマンドが失敗しても次の行に実行が移る http://quwahara.hatenablog.com/entry/2012/02/13/201713