[Scons-users] How to write/append the compiler output to a logfile
bill at baddogconsulting.com
Wed Dec 11 10:57:05 EST 2019
So you want to collect all C compilations output into a file which is the
input of a builder?
PRINT_CMD_LINE_FUNC is likely not the solution for that.
Changing CCCOM is o.k. It's not forbidden or advised against. It's normal
Also a command line with
"command source > output file"
Will overwrite the output file on each invocation. So you'd end up with
only the last one.
With this example:
'CCCOM': '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES' >
$TARGET' but that's really changing CCCOM, so the (gcc) builder will not
Would TARGET be different for every target?
What is the post link/compile step. Is this run per compile and link? or is
this meant to run after all link and compiles are completed?
On Wed, Dec 11, 2019 at 8:48 AM Arndt Pauschardt <arndt.pauschardt at web.de>
> I have found PRINT_CMD_LINE_FUNC, so sorry for asking about logging the
> actual command line, I should have read the manual more thoroughly.
> PRINT_CMD_LINE_FUNC allows to do exactly what I want for the actual
> command line.
> On the output of the command I still would like your advice - in my
> example the object is a target and the logfile is (another) target.
> *Gesendet:* Mittwoch, 11. Dezember 2019 um 13:10 Uhr
> *Von:* "Arndt Pauschardt" <arndt.pauschardt at web.de>
> *An:* scons-users at scons.org
> *Betreff:* [Scons-users] How to write/append the compiler output to a
> Hi, everyone
> I would need a little advice ...
> I would like to write/append the compiler command line and the actual
> compiler output (its warnings, errors, ...) into a logfile.
> At the same time, I would like to keep the *COMSTR functionality of SCons
> so that the console output is showing what e.g CCCOMSTR is set to and the
> logfile has the output of CCCOM.
> I guess a possible solution is to tweak CCCOM from
> 'CCCOM': '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES',
> to sth like
> 'CCCOM': '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES >
> but I'm not sure whether this is good solution:
> - to me, CCCOM is "owned" by the builder, in this case it would tbe gcc
> builder. So tweaking it is like reaching out into someone else's pocket.
> - I would like to use logfile as a source for a post-compile/link step, so
> it is not only a logfile, but also a target of the compile step and a
> source of a post-compile step. Therefore, CCCOM should look more like
> 'CCCOM': '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES' >
> $TARGET' but that's really changing CCCOM, so the (gcc) builder will not
> be happy.
> So, all in all: How would/are you doing this? I googled it and searched
> the mailing list, but nothing substantial turned up so far.
> _______________________________________________ Scons-users mailing list
> Scons-users at scons.org
> Scons-users mailing list
> Scons-users at scons.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scons-users