Re: How remove defalut target from Object function
Bill Deegan <[email protected]> Sun, 24 Sep 2023 14:31:02 -0700
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CHKns-gktCBBfiySd=mA0i4QhY1rjPb45EgLnz2Um6k0w@mail.gmail.com> |
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 <[email protected]> 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 <[email protected]> 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 >> [email protected] >> https://pairlist4.pair.net/mailman/listinfo/scons-users >> > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users