[Scons-users] Can I filter the objects in env.Program
Bill Deegan
bill at baddogconsulting.com
Fri Mar 1 23:54:43 EST 2013
On Fri, Mar 1, 2013 at 8:53 PM, Bill Deegan <bill at baddogconsulting.com>wrote:
>
>
> On Fri, Mar 1, 2013 at 8:51 PM, Bill Deegan <bill at baddogconsulting.com>wrote:
>
>>
>>
>> On Fri, Mar 1, 2013 at 6:51 PM, prife <goprife at gmail.com> wrote:
>>
>>> 2013/3/2 Bill Deegan <bill at baddogconsulting.com>
>>>
>>>>
>>>>
>>>> On Fri, Mar 1, 2013 at 6:37 PM, prife <goprife at gmail.com> wrote:
>>>>
>>>>> 2013/3/2 William Deegan <bill at baddogconsulting.com>
>>>>>
>>>>>>
>>>>>> So do you only want to change the list of obis in the SConstruct?
>>>>>> And in what way do you want to modify them?
>>>>>>
>>>>> I want to change the list of objs in env.Program.In other words, I
>>>>> want to get the list of total objs which are used to build the target.
>>>>> I want to save them in temp file.
>>>>>
>>>>
>>>> For what purpose?
>>>> Saving them in a temp file, is not changing them...
>>>> Is the command line too long?
>>>>
>>>
>>> Yes, the command is too long, While the following method only can work
>>> with a patch to scripts of SCons.
>>> if rtconfig.PLATFORM == 'armcc':
>>> env["TEMPFILE"] = SCons.Platform.TempFileMunge
>>> # env["LINKCOM"] = "${TEMPFILE('$LINK -o $TARGET $SOURCES')}"
>>> env["LINKCOM"] = "$LINK -o $TARGET $LINKFLAGS ${TEMPFILE('--via
>>> $SOURCES')}"
>>> env["TEMPFILEPREFIX"] = ' ' # arm tool chain
>>>
>>> C:\Python27\Lib\site-packages\scons-2.2.0\SCons\Platform\ __init__.py
>>>
>>> --- __init__.old.py Mon Nov 19 02:59:32 2012
>>> +++ __init__.py Mon Nov 19 02:59:19 2012
>>> @@ -202,7 +202,7 @@
>>>
>>> prefix = env.subst('$TEMPFILEPREFIX')
>>> if not prefix:
>>> - prefix = '@'
>>> + prefix = ''
>>>
>>> args = list(map(SCons.Subst.quote_spaces, cmd[1:]))
>>> os.write(fd, " ".join(args) + "\n")
>>>
>>> so I want to save the objs in a temp file, then modify the
>>> env['"LINKCOM"] as;
>>> env["LINKCOM"] = "$LINK -o $TARGET $LINKFLAGS --via temp.txt }"
>>>
>>
>>
>> Might I sugguest that you copy the patched version of TempFileMunge into
>> your SConstruct.
>> Then use:
>> env["TEMPFILE"] = MyTempFileMunge
>>
>> I think that should work.
>>
>
> Or env["TEMPFILEPREFIX"] = ' ' <- a single space? Would that work?
>
Or from the comments in the TempFileMunge function:
env["TEMPFILEPREFIX"] = '-via' # arm tool chain
?
-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130301/d050ffeb/attachment.htm>
More information about the Scons-users
mailing list