Re: How to write/append the compiler output to a logfile

"Arndt Pauschardt" <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <trinity-9688abf7-e4d6-4463-826e-a61a54a07642-1576072092516@3c-app-webde-bap40>
Hi,

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.

Thx

Arndt

Gesendet: Mittwoch, 11. Dezember 2019 um 13:10 Uhr

Von: "Arndt Pauschardt" <[email protected]>

An: [email protected]

Betreff: [Scons-users] How to write/append the compiler output to a logfile

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 > $CCLOGFILE'

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[0] -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES' > $TARGET[1]' 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.

Thx

Arndt

_______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.