help-make
[Top][All Lists]
Advanced

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

Re: customizing implicit rules


From: Aditya Kher
Subject: Re: customizing implicit rules
Date: Tue, 23 Oct 2007 17:55:39 +0900

[[CC the Help-make]]

On 10/23/07, Aditya Kher <address@hidden> wrote:
> Nope. that doesnt work
> consider my setup like this:
>
> /home/usr/boo/Makefile:
> ------
> CPP_DIR:=/home/user/source_dir
> CPP=g++
> objects:=$(patsubst ${CPP_DIR}/%.cpp,${CURDIR}/%.o,$(wildcard
> ${CPP_DIR}/*.cpp))
>
> all:objects
>
> -------
> I get
> %pwd
> /home/usr/boo
> %gmake -n
> g++ -o /home/usr/boo/../source_dir/foo.o ../source_dir/foo.cpp
>
> while without $CURDIR in the variable definition, I get
> %gmake -n
> g++ -o /home/usr/source_dir/foo.o ../source_dir/foo.cpp
>
> so its essentially the same regardless of use of $CURDIR.
> -aditya
>
>
> On 10/23/07, Chen Jun (陈军) <address@hidden> wrote:
> >
> >
> >
> >
> > Hello, Aditya Kher,
> >  objects:=$(patsubst ${CPP_DIR}/%.cpp,${CURDIR}/%.o,$(wildcard  
> > ${CPP_DIR}/*.cpp))
> >
> > Is that what you want?
> >
> > $(CURDIR) is a make internal variable representing current working 
> > directory.
> >
>


-- 
Aditya Kher
http://kher.org

reply via email to

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