python - Scons build order -


we have 2 tools: tool1 , tool2. tool1 create targetfile, based on sourcefile. want use targetfile int tool2 create newtargetfile. structure similar this:

   env.tool1(targetfile, sourcefile)    env.tool2(newtargetfile, targetfile) 

emitter of tool2 using targetfile magis. result, scons says can't open targetfile (because wasn't builded yet).

how make so, scons build tool1 before tool2?

you should able use return value of first call (a node or list of nodes) input second call:

res = env.tool1(targetfile, sourcefile) env.tool2(newtargetfile, res) 

this should create required dependency automatically. usually, specifying simple filename string, "foo.in", targetfile should work too. i'm guessing emitter doing tricks , returning additional filenames, or different filename targetfile instead. may want check return value with:

res = env.tool1(targetfile, sourcefile) print map(str, res) env.tool2(newtargetfile, res) 

, or similar.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -