3
考慮從GNU的摘錄進行手動對僞目標:請不執行食譜爲僞目標
一旦做到這一點,
make clean' will run the commands regardless of whether there is a file named
乾淨」。
爲什麼我看不到我的食譜執行,事件雖然在調試輸出使說它必須重拍這些目標?下面是一個例子生成文件來證明這個問題:
all:
@echo Rule to build 'all'
.PHONY: clean a.clean b.clean
clean: a.clean b.clean
@echo Cleaning toplevel
%.clean:
@echo Cleaning $*
這裏是輸出 - 注意,是沒有Cleaning $*
make: Entering directory `/tmp'
Cleaning toplevel
make: Leaving directory `/tmp'
這裏提到的是從-d
輸出:
Considering target file `clean'.
File `clean' does not exist.
Considering target file `a.clean'.
File `a.clean' does not exist.
Finished prerequisites of target file `a.clean'.
Must remake target `a.clean'.
Successfully remade target file `a.clean'.
Considering target file `b.clean'.
File `b.clean' does not exist.
Finished prerequisites of target file `b.clean'.
Must remake target `b.clean'.
Successfully remade target file `b.clean'.
Finished prerequisites of target file `clean'.
Must remake target `clean'.