.phony 簡單來說就是告訴 makefile 這個 target 不是真實的檔案
這樣做的好處是:
# --- Makefile ---- .PHONY: file1 file1: echo "file1 "
這樣就算資料夾裡面產生了檔名為 file1 的檔案,也依然會執行 echo
https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
There are two reasons to use a phony target: 1. to avoid a conflict with a file of the same name 2. to improve performance.
http://make.mad-scientist.net/constructed-macro-names/
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up