case 1:
Makefile
clean:
rm a
environment_1 :
There is only file a
$ make clean
clean a
environment_2 :
There are two file a and clean
$ make clean
make: 'clean' is up to date.
can't clean a
case 2:
Makefile
.PHONY: clean
clean:
rm a
environment_1 :
There is only file a
$ make clean
clean a
environment_2 :
There are two file a and clean
$ make clean
clean a
reference:
http://deanjai.blogspot.com/2006/03/makefilevpathphony.html
https://read01.com/zh-tw/NyRx80.html#.XJM-JIURVmU