Mail Archives: djgpp-workers/1997/11/24/06:21:42
On Mon, 24 Nov 1997, Hans-Bernhard Broeker wrote:
> * I tried to use 'gcc -print-libgcc-file-name' to auto-set
> '$(MY_LIBGCC_A)' for native builds. But gcc prints something like
> 'c:/djgpp/lib\libgpp.a' (note the '\'). The backslash in
> this string gets eaten up when I write the makefile line like this:
>
> MY_LIBGCC_A = $(shell $(CROSS_GCC) -print-libgcc-file-name)
>
> Any ideas how to get around that?
I don't understand how exactly is the backslash eaten up. $(shell) by
itself doesn't do anything like this (I just checked), so it is eaten
up in some other place, not in the line that you show. Can you tell
where exactly?
A simple (though ugly) way of preventing this is to say this:
MY_LIBGCC_A = $(subst \,/,$(shell $(CROSS_GCC) -print-libgcc-file-name))
Depending on where does `\' get eaten, there might be better ways.
(And btw, I agree with DJ that the GCC build should be changed to use
forward slashes everywhere.)
- Raw text -