[Scons-users] Builder Chains Not Working?

Mark Ribau mribau at realtaentertainment.com
Wed Nov 14 19:00:34 EST 2012


Oddly enough, this appears to fix it:

ret = env.MultiBuilder1("target2.json", ['target1.json', 'source2.json'])
env.Alias( "myalias", True, ret)
ret = env.Builder2("target2.binary", "target2.json")
env.Alias( "myalias", True, ret)
ret = env.InstallAs(os.path.join(installBase,"target2.binary"),
"target2.binaryplatform")
env.Alias( "myalias", True, ret)


I guess this is because SCons thinks I haven't requested to build those
files? But since they are dependencies, shouldn't SCons automatically build
them??

Do I need to modify the BUILD_TARGETS at run time if I have found
sub-dependencies that need to be built?



*
*
----
*mark ribau*
*software engineer
*

On Wed, Nov 14, 2012 at 3:12 PM, Mark Ribau
<mribau at realtaentertainment.com>wrote:


> I should also note that if we have this block instead:

>

> ret = env.MultiBuilder1("target2.json", ['target1.json', 'source2.json'])

> #ret = env.Builder2("target2.binary", "target2.json")

> #ret = env.InstallAs(os.path.join(installBase,"target2.binary"),

> "target2.binaryplatform")

> env.Alias( "myalias", True, ret)

>

> We end up with a target2.json file correctly. The two commented out lines

> are what cause issues.

> *

> *

> *

> *

> ----

> *mark ribau*

> *software engineer*

>

>

> On Wed, Nov 14, 2012 at 2:40 PM, Mark Ribau <

> mribau at realtaentertainment.com> wrote:

>

>> How should we dynamically add discovered dependency targets if not in the

>> emitter?

>> *

>> *

>> *

>> *

>> ----

>> *mark ribau*

>> *software engineer*

>>

>>

>> On Wed, Nov 14, 2012 at 2:20 PM, William Deegan <

>> bill at baddogconsulting.com> wrote:

>>

>>> Mark,

>>>

>>> On Nov 14, 2012, at 3:58 AM, Mark Ribau <mribau at realtaentertainment.com>

>>> wrote:

>>>

>>> So I've got a series of builders, that successively can build from a

>>> root source file, each building a target from the previous.

>>>

>>> in deeper SConscripts:

>>> env.Builder1("target0.json", "source0.json")

>>>

>>> in Builder1's emitter:

>>> env.MultiBuilder1("target1.json", "target0.json")

>>>

>>> in a parent SConscript:

>>>

>>> ret = env.MultiBuilder1("target2.json", ['target1.json',

>>> 'source2.json'])

>>> ret = env.Builder2("target2.binary", "target2.json")

>>> ret = env.InstallAs(os.path.join(installBase,"target2.binary"),

>>> "target2.binaryplatform")

>>> env.Alias( "myalias", True, ret)

>>> *

>>> *

>>> *

>>> *

>>> The problem I have is that it attempts to build the final thing in the

>>> chain, and never builds the previous ones. The dependency graph looks

>>> correct though:

>>>

>>> +-myalias

>>> +-install\target2.binary

>>> +-data\target2.binaryplatform +-data\target2.json |

>>> +-data\target1.json | | +-data\folder\target0.json

>>> | | | +-data\folder\source0.json

>>> | +-data\source2.json

>>>

>>> The error we are getting is:

>>> scons: *** [data\target2.binaryplatform] data\target2.json: No such

>>> file or directory

>>>

>>>

>>> Fairly certain you shouldn't do anything but add the sources and targets

>>> in the emitter.

>>>

>>> Also the arguments to InstallAs() are (target,source) and not

>>> (source,target) as you have above (I believe).

>>>

>>> _Bill

>>>

>>> _______________________________________________

>>> Scons-users mailing list

>>> Scons-users at scons.org

>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>

>>>

>>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121114/0a5b6753/attachment-0001.htm>


More information about the Scons-users mailing list