Scons:运行 make 命令作为目标的依赖项
我有一个库需要构建为我的目标的依赖项。该库是随 Makefile 一起分发的,除了运行之外,构建它没有什么特殊需要:
make my_target
如果我的文件如下所示,我将如何将此命令作为我的 SConstruct 文件的一部分运行:
env = Environment()
flags = env.ParseFlags( CCFLAGS + LDFLAGS )
env.MergeFlags( flags )
env.Program( target = 'my_prog', source = SRC )
I have a library that needs to by built as a dependency for my target. The library is distributed with a Makefile and there's nothing special needed to build it other than to run:
make my_target
How would I run this command as part of my SConstruct file if my file looks something like:
env = Environment()
flags = env.ParseFlags( CCFLAGS + LDFLAGS )
env.MergeFlags( flags )
env.Program( target = 'my_prog', source = SRC )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个以库名称作为目标的
Command
构建器:请务必将此库添加到您的
Program
行:Create a
Command
builder with the name of the library as the target:Be sure to add this library to your
Program
line: