[Scons-users] Modify CXXFile Builder

Stijn De Ruyck Stijn.DeRuyck at onsemi.com
Tue Nov 18 04:38:09 EST 2014


Hello,

I'm struggling to find the best way to extend the CXXFile Builder functionality.
In short, in our make-based project we have this:

file.cc: scanner.l
      /usr/bin/flex++ -Cfr -p -file.cc scanner.l; cat file.cc | sed 's/#include <FlexLexer.h>//g' > file_new.cc; mv file_new.cc file.cc

What is the best way to translate this to SCons? I have looked at the documentation (2.3.0) but I'm still confused.
Should I write a custom builder (using generators? using emitters?...)? Use env.Command? Write a pseudo-builder?

env.CXXFile already does mostly what I want, I just want to add the sed command somehow...

Thank you

Stijn De Ruyck
Test Methodology Software Engineer
ON Semiconductor
Tel: +32 55 33 29 36

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141118/2183a61b/attachment.html>


More information about the Scons-users mailing list