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

Hua Yanghao huayanghao at gmail.com
Thu Dec 6 17:46:26 EST 2018


For example:
I can set OBJSUFFIX to ".${CC}.o", which produces test.gcc.o, however
I cannot do set OBJSUFFIX to ".${SOURCE}.o", which produce "test..o"
So what are the existing variables OBJSUFFIX could reference? Or how
is the TARGET get generated and is there a way to hijack this?
I could write a new builder to achieve what I want but I am really
wondering if scons already have some easier way for this.
On Thu, Dec 6, 2018 at 11:15 PM Hua Yanghao <huayanghao at gmail.com> wrote:
>
> Dear Scons Users,
> I recently encountered an issue that we have a existing code base that
> comes with multiple files of the same name but different suffixes:
> e.g. test.c, test.cpp, test.S.
>
> The problem is they are in the same folder (hence will end up in the
> same build dir), and all builds to test.o (StaticObject). Is there a
> easy/straightforward way in scons that having them to build in a
> target name with the full original names, e.g. test.c.o, test.cpp.o,
> test.S.o?
>
> Thanks,
> Yanghao


More information about the Scons-users mailing list