Re: C/C++ Object Suffix to include source names

Bill Deegan <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CH6K71QZKAZVdPsz7ejV+o=LUq-qG3wPj1qqid4R+GZKg@mail.gmail.com>
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 <[email protected]> wrote:

> On Fri, Dec 7, 2018 at 4:23 AM Bill Deegan <[email protected]>
> 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
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.