[Scons-users] [Scons-dev] Problem with LINKCOMSTR variable substitution

Strand, Kyle J kyle.strand at beckman.com
Fri Nov 2 14:22:34 EDT 2012


I sent it to the dev list because I'm pretty sure it's a bug, not a usage problem, but I'm not 100% sure. Should I instead have just submitted a bug report instead?

The brackets are just for clarification that everything within them needs to be substituted, so no, removing them does not change the output.

________________________________
Kyle Strand, Software Intern
Beckman Coulter, Inc., Life Sciences Division
4862 Innovation Drive, Fort Collins, Colorado, 80525
(970) 204-7036
________________________________
From: scons-users-bounces at scons.org [scons-users-bounces at scons.org] on behalf of Bill Deegan [bill at baddogconsulting.com]
Sent: Friday, November 02, 2012 12:07 PM
To: SCons developer list; SCons users mailing list
Subject: Re: [Scons-users] [Scons-dev] Problem with LINKCOMSTR variable substitution

Kyle,

This should go to the users mailing list.
The dev list is for development of SCons itself and not for the use of SCons..


On Thu, Nov 1, 2012 at 3:56 PM, Strand, Kyle J <kyle.strand at beckman.com<mailto:kyle.strand at beckman.com>> wrote:
I think this is a bug, but I might just be using env.Replace incorrectly, so if someone could let me know what they think I'd appreciate it. I find that variables in my LINKCOMSTR aren't always be properly substituted. For instance, if I define an environment as follows:

env = Environment(LINKCOMSTR = "Linking... ${TARGET.file}",)
env.Replace(LINKCOMSTR = '${LINKCOM}')

Wouldn't:
env.Replace(LINKCOMSTR='$LINKCOM')
work?


....and then I build targets with that environment, I see the following output:

${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}

(This is on a Windows machine using MSVC.) In other words, only one level of substitution is done on $LINKCOM, but $LINKCOM itself contains other variables which are not substituted out before printing. The correct command is executed, however.

It also appears that there's the same problem with SHLINKCOMSTR, but it does NOT appear to be a problem with other environment variables (CXXCOMSTR, etc).



Please be advised that this email may contain confidential
information. If you are not the intended recipient, please notify us
by email by replying to the sender and delete this message. The
sender disclaims that the content of this email constitutes an offer
to enter into, or the acceptance of, any agreement; provided that the
foregoing does not invalidate the binding effect of any digital or
other electronic reproduction of a manual signature that is included
in any attachment.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121102/fe112733/attachment-0001.htm>


More information about the Scons-users mailing list