Makefile(1) --- .PHONY
2014-04-11 00:46
183 查看
.PHONY is a special built-in target name.
.PHONY's prerequisites are considered to be phony targets. When it is time to consider such a target, make will run its recipe unconditionally, regardless of whether a file with that name exists or
what its last-modification time is.
Case 1:
$ ls
Makefile test
$ cat Makefile
test :
echo "target test~"
$ make
make: `test' is up to date.
Case 2:
$ ls
Makefile test
$ cat Makefile
.PHONY : test
test :
echo "target test~"
$ make
echo "target test~"
target test~
用”.PHONY : test“,无论target test是否存在,它的recipes总是无条件执行。
.PHONY's prerequisites are considered to be phony targets. When it is time to consider such a target, make will run its recipe unconditionally, regardless of whether a file with that name exists or
what its last-modification time is.
Case 1:
$ ls
Makefile test
$ cat Makefile
test :
echo "target test~"
$ make
make: `test' is up to date.
Case 2:
$ ls
Makefile test
$ cat Makefile
.PHONY : test
test :
echo "target test~"
$ make
echo "target test~"
target test~
用”.PHONY : test“,无论target test是否存在,它的recipes总是无条件执行。
相关文章推荐
- makefile中关于all和.PHONY
- makefile里PHONY的相关介绍
- makefile 中的PHONY
- linux Makefile PHONY作用
- makefile里PHONY的相关介绍
- Makefile 中的.PHONY
- Makefile中的PHONY
- Linux之Makefile(.PHONY)
- makefile里PHONY的相关介绍
- makefile 递归用法和.PHONY的讲解
- makefile里PHONY
- 在Makefile中的 ".PHONY "是做什么的?
- .PHONY makefile中的伪目标
- .PHONY makefile中的伪目标
- makefile中目标all与phony用法
- makefile中 phony的用途
- Makefile中的.PHONY
- makefile中PHONY的重要性
- 在Makefile中的 ".PHONY "是做什么的?
- Makefile中的.PHONY