[Scons-users] TryAction ('pkgconfig ..') and PRINT_CMD_LINE_FUNC => exception.
Jos De Laender
jos at de-laender.be
Mon Dec 10 04:30:38 EST 2012
Dirk,
First of all, thanks for doing the effort. Appreciated.
For sure I'm willing to share it, it follows.
But it appears to me you missed an important piece of info : it actually
doesn't matter how the PRINT_CMD_LINE_FUNC looks like,
except it shouldn't print to stdout. So a simple 'print 'Foo'' followed
by return is sufficient to trigger the problem.
Actually , it looks like :
>>> CODE
# Boilerplate to log commands nicely to screen and completely to log file.
def dlPrintCmdLine(s, target, src, env):
# Always to a log file. (and with an extra linefeed to 'see' commands)
LogFile = env['DL_LOGFILE']
LogFile.write('\n%s\n'%s)
ShortText = 'Building object'
# 'Recognized' commands ?
if 'DSCONS_CXX' in s:
ShortText = dlGreen + 'Building CXX object'
elif 'DSCONS_CC' in s:
ShortText = dlGreen + 'Building C object'
elif 'DSCONS_LINK' in s:
ShortText = dlBoldMagenta + 'Linking'
elif 'DSCONS_UIC' in s:
ShortText = dlBoldBlue + 'Generating UIC object'
elif 'DSCONS_MOC' in s:
ShortText = dlBoldBlue + 'Generating MOC object'
elif 'DSCONS_RCC' in s:
ShortText = dlBoldBlue + 'Generating RCC object'
else:
# Install is a kind of exception. Also it points to a func.
# We *assume* fallthrough is install. But that's a very shaky one.
# XXX TODO
ShortText = dlBoldMagenta + 'Installing'
MyMessage = ''
if not env['DL_VERBOSE']:
MyMessage = ShortText + ' ' + ' and '.join([str(x) for x in target])
else:
MyMessage = s
MyMessage += dlNoAttrs
print MyMessage
return None
>>> END CODE
Op 10-12-12 09:15, Dirk Bächle schreef:
> Hi Jos,
>
> On 10.12.2012 00:09, Jos De Laender wrote:
>> Dear all,
>>
>> I'm a new and happy user of Scons.
>> I managed to build and crossbuild a Qt project of mine using Scons,
>> something I didn't manage with CMake.
>>
>> However, now lately I'm experiencing a strange and nasty issue.
>> I read about already on Google, but neither do I find the solution,
>> nor can I solve it myself.
>>
>> I have a detector for pkg-config, along the lines of what's on the wiki.
>>
>> When I install then also a PRINT_CMD_LINE_FUNC, (and remove the .db
>> stuff) I get an exception error in config.log (and the test fails).
>>
>
> can you please show us how your PRINT_CMD_LINE_FUNC actually looks
> like? Then I, or someone else, could try to reproduce this error on my
> (his) machine.
>
> Thanks a lot in advance.
>
> Best regards,
>
> Dirk
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
--
Jos De Laender
www.jodela.be
More information about the Scons-users
mailing list