delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/11/24/06:21:42

Date: Mon, 24 Nov 1997 13:21:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
cc: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: alpha-971114: Makefiles revisited
In-Reply-To: <Pine.LNX.3.93.971124021725.23046B-100000@acp3b9>
Message-ID: <Pine.SUN.3.91.971124132105.23713P-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019