I have both a target test
in my Makefile and a directory called test
in my project. In GNU Make I can declare it to be phony like this:
.PHONY: all compile test clean docs static
Is it possible to do the same in NMake? According to http://www.bell-labs.com/project/nmake/tutorial/s6.html, I need to do
test: .VIRTUAL
but it doesn't work:
F:\SomePath>nmake test /f msvc.mk
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make '.VIRTUAL'
Stop.
I think this is what you are looking for:
http://msdn.microsoft.com/en-us/library/7sb2acw1%28v=VS.71%29.aspx
If i understand it correctly you don't have a .PHONY in nmake (Microsoft's, there are many nmake flavors out there). And the link you posted states that on top:
Maybe you could call one test and the other one tests?
For those who are seeking for a way around this absent .PHONY in nmake:
You may introduce a target which would definitely be a pseudotarget (i.e. choose a name not matching any of the existing files/directories) and make it a dependent of what you mean to be a .PHONY. E.g.:
And here's the output: