Mail Archives: djgpp-workers/1998/07/14/03:14:30
On Mon, 13 Jul 1998, DJ Delorie wrote:
>
> Would this work instead?
>
> ifeq ($(LIBGCCA),)
> LIBGCCA := $(shell $(CROSS_GCC) -print-file-name=libgcc.a)
> LIBGCCA := $(subst \\,/,$(LIBGCCA))
> endif
>
> It avoids a whole program this way.
>
Unfortunatelly this is not working. I had to use only one slash to
get it working (both from command.com :
LIBGCCA := $(shell gcc -print-file-name=libgcc.a)
LIBGCCA := $(subst \,/,$(LIBGCCA))
Slightly weird but what to do.
Maybe sometimes I should think how to avoid backslashes in output
of gcc also here but not only in dependencies outputted by cpp.
Andris
PS. Here is an example of simple makefile that tests it:
--------------------------------------------------------
LIBGCCA := $(shell gcc -print-file-name=libgcc.a)
LIBGCCA := $(subst \,/,$(LIBGCCA))
export LIBGCCA
all:
ls -l $(LIBGCCA)
nm --extern-only $(LIBGCCA) | less
- Raw text -