[Scons-users] Building generated code
Ale Strooisma
a.strooisma at student.utwente.nl
Tue Mar 8 06:17:02 EST 2016
Dear readers,
my current project consists of two parts: a code generation framework and a
runtime framework that in part consists of code generated by the code
generation framework. Both also use some common parts. This architecture
causes some difficulties with building:
1. By default I want to build everything except the generated code -
because it might not be there. How would I do that? Currently I have put
the target in an if statement:
if 'gen' in COMMAND_LINE_TARGETS:
env.Program('gen', Glob('.build/gen/*.cpp') + common_source_files)
The problem with this is that the target is not put in the build tree at
all, instead of just not being executed. One consequence is that this
target is not picked up by 'scons -c' unless I specifically include the
target on the command line.
2. A related problem: when I run 'scons -c gen', all the common sub-targets
are cleaned as well, which makes perfect sense. Is there a way to only
clean the files specific to this target?
I hope my problem is clear, please ask for more information if required.
Kind regards,
Ale Strooisma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160308/692826e3/attachment.html>
More information about the Scons-users
mailing list