help-make
[Top][All Lists]
Advanced

[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:
> changed MAKETARGET="${MAKETARGET}" to MAKETARGET='${MAKETARGET}'. but
> still it didnt work.
> 
> MAKETARGET='g++   -o ././libSampleSoD.so -shared   -Wl,-Bsymbolic
> -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib:.:../lib'  ./obj/debug/sample.o
> -ldl -lpthread -lgcc' 
> 
> g++   -o ././libSampleSoD.so -shared    -Wl,-Bsymbolic
> -Wl,-rpath,:/../lib:.:../lib  ./obj/debug/sample.o    -ldl -lpthread
> -lgcc
> 
> i want shell not to expand $ORIGIN. like:
> 
> g++   -o ././libSampleSoD.so -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
this:

        dynamicdebug : MAKETARGET = ${OSCPP} ... 
$(RPATHFLAG_PREFIX)'$(RPATHFLAG)$(RPATHFLAG_EXTRAS)' ...

Note you have added single quotes into the value, around
$(RPATHFLAG)$(RPATHFLAG_EXTRAS)

So, when make expands the value of the script:

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

you get this:

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

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:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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]