【问题标题】:scons: non-dependency actions ("phantom targets" ?)scons:非依赖行为(“幻像目标”?)
【发布时间】:2010-03-03 18:45:11
【问题描述】:

我不太确定该怎么做……

我想在 SConscript 文件中声明某种动作:

Import('env');
arguments = ['foo','bar','baz'];
phantomTarget = env.DoSomething(arguments);
Return('phantomTarget');

在 SConstruct 文件中:

env['BUILDERS']['DoSomething'] = Builder(action='c:/foodir/foo.exe $ARGUMENTS');

   ...

phantomTarget = SConscript(['doc/SConscript']);
env.Alias('foo', phantomTarget);

这样我就可以在命令行输入

scons foo

它会运行

c:/foodir/foo.exe foo bar baz

我似乎无法做到这一点... scons 想要进行依赖性检查,但在这种情况下我不想这样做:/

【问题讨论】:

  • 你得到什么错误?
  • 我没有收到任何错误,它只是说没有什么可做的。

标签: scons


【解决方案1】:

根据您看到的错误,PhonyTargets 可能会有所帮助?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多