On 2010-02-18 14:37Z, Martin d'Anjou wrote:
> 
> Is it okay to declare .PHONY multiple times, scattered throughout the 
> makefile like this:
> 
> .PHONY: all
> .PHONY: clean
> .PHONY: other

Sure. This example in the manual uses .PHONY that way:
  http://www.gnu.org/software/make/manual/html_node/Special-Variables.html

I find it clearer to keep a target and its .PHONY dependency together:

.PHONY: x
x: prerequisites
        commands
...
.PHONY: y
y: ...

The manual says the prerequisites of .PHONY are combined:

  http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
| Also, you may still declare multiple lines of prerequisites for the
| same target: they are appended appropriately.



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to