[Scons-users] Builder to perform string substitution on source contents to produce a target file?
John Pye
john at curioussymbols.com
Mon Jun 18 02:25:42 EDT 2012
The 'SubstInFile' tool is what you need, I think. We use that in our
project, http://ascend4.org/.
Cheers
JP
On Sun, Jun 17, 2012, at 08:50 PM, M Busche wrote:
> QUESTION:
>
> Is there was a standard builder for doing string-replacement processing
> between input and output files?
>
> BACKGROUND:
>
> I have written a builder that reads in a source file, performs a series
> global string substitutions on the file just read (as defined by a
> dictionary defined in the environment), and writes the result to the
> specified target file. I use this during software packaging to replace
> the string pattern "__VERSION__" in each of my source files with the
> actual software version (which I pull out of my bzr source code control
> system). I also use it to inject projectName, version, and output
> directory settings into a doxygen configuration file (which is
> subsequently used to produce software docs). This seems useful enough
> that I thought it might already exist.
>
> Thanks much!
> Matt
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
--
John Pye
john at curioussymbols.com
More information about the Scons-users
mailing list