[[CC the Help-make]]
> 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
>
>
> >
> >
> >
> >
> > 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