Is it possible to implement something like fallback building method in SCons?
For example, I have following code in my SConscript:
if check_something():
MyBuilder(a, b)
....
if dont_know_how_to_build(a):
FallBackBuilder(a, c)
I can't predict if "normal build method" will be activated.
But I want that when it was not activated and SCons don't
know how to build a
, it used FallBackBuilder
.
Of course I understand that it is bossible to write something like:
if check_something():
MyBuilder(a, b)
else:
FallBackBuilder(a, c)
but I'm not satisfied with this solution,
because there are can be thousand places in my SConscript/SConstruct files
where some builder for a
could be specified.
I just want to specify some "fallback"-method at the and of SConscript.
What do you think? Is it possible? Or that is a wrong direction at all?
To say it with other words, if it possible in some place in SConscript get a list of objects that are already have associated builders?
For example:
Builder1(a,b)
Builder2(b,c)
list_of_buildable_objects = get_list_of_buildable_objects()
Builder3(c,d)
I want to know how to get the list of buildable objects that in this example must be equal to [a, b]
or something like this.