Johan
Johan

Reputation: 1693

Makefile include directive using nmake

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

Upvotes: 1

Views: 643

Answers (1)

Johan
Johan

Reputation: 1693

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

Upvotes: 1

Related Questions