Rouben Rostamian
2006-04-27 02:49:39 UTC
The GNU "make" has a special target, named .PHONY which is
used thus:
.PHONY: clean
clean:
rm -f *.o
This way, `make clean' will run the "rm -f *.o" command
regardless of whether there is a file named `clean'.
Now, an inspection of the ancient BSD Unix Programmer's Manual
reveals that the original "make" did not have the .PHONY target.
I am guessing that .PHONY is a GNUism.
I have a vague recollection of a hack that achieved the effect
of .PHONY, but in the traditional make. Can anyone remind me
how it was done?
used thus:
.PHONY: clean
clean:
rm -f *.o
This way, `make clean' will run the "rm -f *.o" command
regardless of whether there is a file named `clean'.
Now, an inspection of the ancient BSD Unix Programmer's Manual
reveals that the original "make" did not have the .PHONY target.
I am guessing that .PHONY is a GNUism.
I have a vague recollection of a hack that achieved the effect
of .PHONY, but in the traditional make. Can anyone remind me
how it was done?
--
Rouben Rostamian
Rouben Rostamian