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

Hua Yanghao huayanghao at gmail.com
Fri Dec 7 03:53:16 EST 2018


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.


More information about the Scons-users mailing list