Hello!

On Fri, Jan 21, 2005 at 04:43:42AM +0100, Michael Niedermayer wrote:
> On Tuesday 18 January 2005 15:09, Philipp Matthias Hahn wrote:
> > 3. The quotation of "SRC_PATH='$source_path'" with single quotes is
> > wrong in a Makefile, since the single quotes are used verbatim and are
> > not shell meta characters.
>
> and removing them breaks compilation if there are spaces in the path

Yes, you are right. The problem is, SRC_PATH is used in VPATH:
        Makefile:VPATH=$(SRC_PATH)
        tests/Makefile:VPATH=$(SRC_PATH)/tests
        libavcodec/Makefile:VPATH=$(SRC_PATH)/libavcodec
        vhook/Makefile:VPATH=$(SRC_PATH)/vhook
        libavformat/Makefile:VPATH=$(SRC_PATH)/libavformat

But VPATH can not contain directory names with blanks, since blanks (and
colons) seperate multiple directories from each other:
        info Make "General Search"

So you are hosed anyway if you try to build to build outside the source
tree AND the source tree path contains blanks.
http://lists.gnu.org/archive/html/help-make/2003-05/msg00014.html

But also watch the following experiment:
        mkdir build;cd build;"$PWD/../configure";make -p | grep SRC_PATH
        sed -ie "/SRC_PATH/s/'//g" config.mak;make

make[1]: *** No rule to make target `bitstream.c', needed by `bitstream.o'.  
Stop.
SRC_PATH = '/tmp/pmhahn/ffmpeg-0.cvs20050108/build/..'
           ^                                         ^
VPATH = $(SRC_PATH)/libavcodec

BYtE
Philipp
-- 
  / /  (_)__  __ ____  __ Philipp Hahn
 / /__/ / _ \/ // /\ \/ /
/____/_/_//_/\_,_/ /_/\_\ [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to