[Scons-users] How remove defalut target from Object function

Bill Deegan bill at baddogconsulting.com
Sun Sep 24 17:31:02 EDT 2023


One caveat, this assumes the generated file is still going to be
/Debug/Obj/main.o from your initial example, and not named something else.
Scons keeps track of the target files and if what a build step generates
doesn't match what's expected you will see unnecessary rebuilds.


On Sun, Sep 24, 2023 at 2:29 PM Bill Deegan <bill at baddogconsulting.com>
wrote:

> Should be fairly easy.
> Just change your build string to have
> -o ${TARGET.dir}
> instead of
> -o $TARGET
>
> If this is for non-shared object C file the variable in question would be
> CCCOM.
>
> -Bill
>
> On Sun, Sep 24, 2023 at 1:26 PM Mats Wichmann <mats at wichmann.us> wrote:
>
>> On 9/24/23 06:49, Yu,Zhiwei (YFI,Shanghai,CN) wrote:
>> > Hi Guys,
>> >
>> > I am trying to use Scons with IAR, IAR is a embedded IDE.
>> > For iccarm(IAR compiler), It's unnecessary to set target name, I
>> > just set the directory of object file.
>> > For example,
>> > iccarm.exe -o /Debug/Obj   /Src/main.c
>> > But if I don't set target file name, Scons will set default target
>> > file directory and name which base on the source file.
>> > I want to use iccarm method that set the target directory only, and
>> > remove default object file name from Object function.
>> > How can I do it.
>>
>> This concept is roughly the same as "batch" building, which is only
>> explicitly supported right now for the Microsoft compiler - you can see
>> a note here:
>>
>> https://scons.org/doc/production/HTML/scons-man.html#cv-MSVC_BATCH
>>
>> It's not that this hasn't come up before (see, for example:
>> https://github.com/SCons/scons/issues/1923), but the work to expand this
>> to other places hasn't been contributed yet.  Not sure which tool you're
>> using to run iccarm, so it's hard to advise further at this point.
>>
>> _______________________________________________
>> 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/20230924/29c6579f/attachment.htm>


More information about the Scons-users mailing list