help-make
[Top][All Lists]
Advanced

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

RE: Is -C @ magical?


From: Doug Konrad
Subject: RE: Is -C @ magical?
Date: Tue, 21 Jan 2014 20:08:12 +0000

Paul,

If I use the MAKETARGET line as I entered it in my email, everything works as 
it should. However, if I edit the line to be:

 MAKETARGET = $(MAKE) --no-print-directory -C /.../some/other/path -f 
$(CURDIR)/Makefile \
                SRCDIR=$(CURDIR) $(MAKECMDGOALS)

Then I get

make[3]: *** No rule to make target `/.../some/other/path /Makefile'.  Stop.

It seems that $(CURDIR)/Makefile is pointing somewhere else.

Doug

[previous reply mistakenly not sent to list]
-----Original Message-----
From: Paul Smith [mailto:address@hidden 
Sent: January-21-14 10:32 AM
To: Doug Konrad
Cc: address@hidden
Subject: Re: Is -C @ magical?

On Tue, 2014-01-21 at 18:23 +0000, Doug Konrad wrote:
> We are using the advanced VPATH method described in 
> http://make.mad-scientist.net/multi-arch.html#advanced.
> 
> The makefile line:
> 
> MAKETARGET = $(MAKE) --no-print-directory -C $@ -f $(CURDIR)/Makefile \
>                SRCDIR=$(CURDIR) $(MAKECMDGOALS)
> 
> has got me puzzled. When I use -C $@, the Makefile is found in CURDIR.
> However, if I use -C /.../some/other/path, Make doesn't look in 
> CURDIR, it looks in the directory specified with -C. Is this correct?

I'm not sure I understand the question.

Given the above line make always loads $(CURDIR)/Makefile, because of the "-f 
$(CURDIR)/Makefile" command line option.  Because "-f" is given make doesn't 
look for the default Makefile in the working directory.


reply via email to

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