[Scons-users] Passing $ORIGIN through Variables from the command line?

Andrew C. Morrow andrew.c.morrow at gmail.com
Wed Jan 21 19:59:58 EST 2015


Ah, it appears that double $ works:

> scons SHLINKFLAGS='-Wl,-rpath=$$ORIGIN/../lib'
scons: Reading SConscript files ...
ARGUMENTS: {'SHLINKFLAGS': '-Wl,-rpath=$$ORIGIN/../lib'}
-Wl,-rpath=$ORIGIN/../lib
SHLINKFLAGS: '-Wl,-rpath=$ORIGIN/../lib'
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.

Re using RPATH. Yes that would probably be a better choice to allow
customization. We just added support for user specified flags on the
command line in this project, so we are still exploring the set that we
want to make available.

In any event, knowing how to get a $ through the Variables mechanism is
probably useful in a wider context than just origin processing.

Thanks for your help,
Andrew




On Wed, Jan 21, 2015 at 6:35 PM, Dirk Bächle <tshortik at gmx.de> wrote:

> On 22.01.2015 00:29, Dirk Bächle wrote:
>
>> Hi Andrew,
>>
>> On 22.01.2015 00:13, Bill Deegan wrote:
>>
>>> Try: ${ORIGIN} ?
>>>
>>> On Wed, Jan 21, 2015 at 2:16 PM, Andrew C. Morrow <
>>> andrew.c.morrow at gmail.com <mailto:andrew.c.morrow at gmail.com>> wrote:
>>>
>>>
>>>     Given the following minimal SConstruct:
>>>
>>>     [...]
>>>
>>>
>>>     I can't see how to get env['SHLINKFLAGS'] to contain the string
>>> -Wl,-rpath=$ORIGIN/../lib from the command line:
>>>
>>>
>> my first try would be to use the intended way of specifying an "rpath" by
>> setting the environment variable RPATH, and then let the
>> gnulink Tool/Builder do the rest of the work. Check out Appendix A
>> "Construction Variables" in the UserGuide (
>> http://www.scons.org/doc/production/HTML/scons-user.html ) and search
>> for the keyword RPATH...
>>
>>
> ...and for the $ORIGIN part there is a Wiki page here:
>
>   http://www.scons.org/wiki/UsingOrigin
>
>
> Dirk
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150121/a611ce9a/attachment-0001.html>


More information about the Scons-users mailing list