Reputation: 25974
When using make for just commands, do you then need to add .PHONY targets?
Note: I do not have a file called "all"
# Do I need this, if no prerequisites
.PHONY somecommands
# Taget with no prerequisites
somecommands:
@echo hello
Upvotes: 0
Views: 58
Reputation: 6027
.PHONY
is needed when the target isn't a file.
This is the Makefile
:
all:
@echo DONE
Try to test:
$ make all
DONE
$ touch all
$ make
`all' is up to date.
Upvotes: 1