Date: Mon, 24 Nov 1997 13:21:26 +0200 (IST) From: Eli Zaretskii To: Hans-Bernhard Broeker cc: DJ Delorie , djgpp-workers AT delorie DOT com Subject: Re: alpha-971114: Makefiles revisited In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.)