This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: #line directive and -D option
From: Jan Engelhardt <jengelh@medozas.de>
...
> >If you don't want the prefix, don't append the prefix.
>
> Well sometimes that just is not possible; for example when
> you do an out-of-srcdir build in an autotools project, aka:
>
> mkdir obj
> cd obj
> ../configure
>
> then the compiler will be invoked with lots of ../${filename}.c.
> That's why I use basename.
Some part of prefix is needed if there is a same filename in different
direcotry, so I wanted to strip top N prefix, not all dirname. However,
I think this is more of a build environment issue, and if there were any
convenient gcc functionlarity, I wanted to use it.
Best Regards,
(Hiroki Kaminaga)
t
--