Hello, Aditya Kher,  

It's something odd in your reply. Could you please present a complete makefile 
and show its output? 

At least, the makefile snippet you gave below was not a reasonable makefile -- 
at least, no rule to make the target "objects".

CPP_DIR:=/home/user/source_dirCPP=g++objects:=$(patsubst 
${CPP_DIR}/%.cpp,${CURDIR}/%.o,$(wildcard ${CPP_DIR}/*.cpp))
all: objects 

======== 2007-10-23 16:55:49 You wrote: ========

[[CC the Help-make]]

On 10/23/07, Aditya Kher  <[EMAIL PROTECTED] > 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 (陈军)  <[EMAIL PROTECTED] > 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

= = = = = = = = = = = = = = = = = = = = = = 
Best Regards
              Chen Jun (陈军)
[EMAIL PROTECTED]
               2007-10-23
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to