1
votes

Using nmake from command promp I try to inlcude an Makefile like this

OUT = .
include $(OUT)\generated\deps.mk

ending up in an fatal error

fatal error U1052: file '$(OUT)\generated\deps.mk' not found

replacing the variable with a . i.e. running

include .\generated\deps.mk

works! What am I doing wrong here? Using nmake included in Visual Studio 12

1

1 Answers

1
votes

I solved it myself, if using a ! before include statement, or enclosing the path in < > the variable gets expanded

So, either

OUT = .
!include $(OUT)\generated\deps.mk

or

OUT = .
include <$(OUT)\generated\deps.mk>

works. And ofcourse both combined