开发者

Waf (build tool): PHONY targets like Make?

开发者 https://www.devze.com 2023-02-02 16:31 出处:网络
how do you set a target - maybe Waf calls them \"commands\" - to always be executed?That is to be like PHONY targets in Make?

how do you set a target - maybe Waf calls them "commands" - to always be executed? That is to be like PHONY targets in Make?

I'm using Waf to build - among other things - a Visual Studio solution, whose dependencies and recompilation I would prefer to be managed by Visual Studio itself.

Currently I'm using this (simplified) definition:

def build(bld):
  bld( rule = "msbuild MySolution.sln /target:Build /property:CONFIGURATION=Release",
      source = "",
      target = "program.exe" )

However, "msbuild" g开发者_高级运维ets called only when "program.exe" is missing.

Thanks.


Asked this question on the waf-users mailing list and the solution is to add the "always" parameter:

def build(bld):
   bld( rule = "msbuild MySolution.sln /target:Build /property:CONFIGURATION=Release",
      target = "program.exe" ,
      always = True )
0

精彩评论

暂无评论...
验证码 换一张
取 消