[Scons-users] C/C++ Object Suffix to include source names

Bill Deegan bill at baddogconsulting.com
Fri Dec 7 08:57:32 EST 2018


Can you paste the logic you're using to set OBJSUFFIX?
Take a look in the man page at generators, the source name should be
avalailbe at that point.

On Fri, Dec 7, 2018 at 3:53 AM Hua Yanghao <huayanghao at gmail.com> wrote:

> On Fri, Dec 7, 2018 at 4:23 AM Bill Deegan <bill at baddogconsulting.com>
> wrote:
> >
> > A) That's really bad practice.. (but I'm sure you know that)
> I wouldn't do that myself ... but a lot of internal and external
> highly respected project does this (e.g. Arduino does this too).
>
> > B) You can change SHOBJSUFFIX to be a generator that looks at the source
> file's suffix and does what you're sugguesting.
> >      I think that should work.
> I will look into it ... the thing is there again some inconsistency I
> observed (maybe due to my limited understanding) when scons does the
> expansion of variables. e.g. if I set OBJSUFFIX to "${CC}.o", it picks
> up CC=gcc. However if I set OBJSUFFIX to "${SOURCE}.o", it will not
> pick up ${SOURCE} as the file name (it is empty string). So I really
> want to understand this behavior a little bit better.
> _______________________________________________
> 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/20181207/25cecc2e/attachment.html>


More information about the Scons-users mailing list