Jason S
Jason S

Reputation: 189876

scons: non-dependency actions ("phantom targets" ?)

I'm not quite sure how to do this...

I want to declare some kind of action in an SConscript file:

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

and in the SConstruct file:

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

   ...

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

so that at the command line I can type

scons foo

and it will run

c:/foodir/foo.exe foo bar baz

I can't seem to do this... scons wants to do dependency checking and I don't want to do that in this case :/

Upvotes: 1

Views: 364

Answers (1)

Dave Bacher
Dave Bacher

Reputation: 15982

Depending on what error you're seeing, maybe PhonyTargets will help?

Upvotes: 4

Related Questions