[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unable to use $ORIGIN in rpath

From: Paul Smith
Subject: Re: unable to use $ORIGIN in rpath
Date: Wed, 15 Aug 2007 01:39:22 -0400

On Wed, 2007-08-15 at 10:39 +0530, m c wrote:
> still it didnt work.
> MAKETARGET='g++   -o ././ -shared   -Wl,-Bsymbolic
> -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib:.:../lib'  ./obj/debug/sample.o
> -ldl -lpthread -lgcc' 
> g++   -o ././ -shared    -Wl,-Bsymbolic
> -Wl,-rpath,:/../lib:.:../lib  ./obj/debug/sample.o    -ldl -lpthread
> -lgcc
> i want shell not to expand $ORIGIN. like:
> g++   -o ././ -shared   -Wl,-Bsymbolic  -Wl,-rpath,
> '$ORIGIN:$ORIGIN/../lib:.:../lib'  ./obj/debug/sample.o    -ldl
> -lpthread -lgcc

That's because I forgot something.  Your value of MAKETARGET looks like

        dynamicdebug : MAKETARGET = ${OSCPP} ... 

Note you have added single quotes into the value, around

So, when make expands the value of the script:

        MAKETARGET='${MAKETARGET}' ... $(MAKE) -f

you get this:

        MAKETARGET='  '$ORIGIN:$ORIGIN/../lib:'  ' make -f

basically the single quotes start and stop immediately, rather than
actually quoting anything.

I don't know why you have those single quotes in the value of
MAKETARGET, but one way to fix the problem is remove them.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]