Waf(构建工具):像 Make 这样的 PHONY 目标?
你如何设置一个始终被执行的目标(也许 Waf 称其为“命令”)?那就是像 Make 中的 PHONY 目标一样?
我正在使用 Waf 构建一个 Visual Studio 解决方案,我更希望由 Visual Studio 本身来管理其依赖项和重新编译。
目前我正在使用这个(简化的)定义:
def build(bld):
bld( rule = "msbuild MySolution.sln /target:Build /property:CONFIGURATION=Release",
source = "",
target = "program.exe" )
但是,仅当“program.exe”丢失时才会调用“msbuild”。
谢谢。
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" gets called only when "program.exe" is missing.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 waf-users 邮件列表上问这个问题,解决方案是添加“always”参数:
Asked this question on the waf-users mailing list and the solution is to add the "always" parameter: