makefile .PHONY
The special rule .PHONY tells Make which targets are not files. This avoids
conflict with files of the same name, and improves performance.
If a phony target is included as a prerequisite for another target, it will be
run every time that other target is required. Phony targets are never up-to-
date.
请看下面的例子,当你创建了一个叫clean的文件,然后再调用make事,clean不会被调用。
[jialiang@ht191w tmp]$ ll
total 4
-rw-rw-r-- 1 jialiang users 29 May 17 12:51 mk
[jialiang@ht191w tmp]$ cat mk
clean:
echo "clean running"
[jialiang@ht191w tmp]$ make -f mk
echo "clean running"
clean running
[jialiang@ht191w tmp]$ touch clean
[jialiang@ht191w tmp]$ make -f mk
make: `clean' is up to date.
[jialiang@ht191w tmp]$ vi mk
[jialiang@ht191w tmp]$ cat mk
.PHONY: clean
clean:
echo "clean running"
[jialiang@ht191w tmp]$ make -f mk
echo "clean running"
clean running
http://hi.baidu.com/%D1%CC%D3%EA%BB%C6%BB%E82009/blog/item/8c5d04762616f400b051b996.html
http://linuxdevcenter.com/pub/a/linux/2002/01/31/make_intro.html?page=2