Re: current directory

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.make.windows
Message-ID <[email protected]>
> Date: Thu, 13 Dec 2007 22:46:43 +0100
> From: fabien <[email protected]>
> CC: "'[email protected]'" <[email protected]>
> 
>  > Then something is wrong with your shell, or with the cd command, or
>  > maybe you have your shell set up to go to the root directory.  Since
>  > $(CURDIR), computed by Make on startup, shows the correct directory,
>  > I'd say Make is working correctly, starting in the directory where you
>  > invoked it, while $(shell cd) somehow messes things up.
> 
> I think it's a problem if an application doesn't have the same result on
> different computers.

I agree that it's a problem, but the question is: where is the reason
for that problem?  So far, I see no evidence that the reason is in
Make.  To the contrary, I see evidence that Make is working correctly:
the value of $(CURDIR) is computed by Make when it starts, and its
value clearly shows that Make starts in the directory where you
invoked it.

> The problem is not the command "cd" but all shell 
> commands like "dir", etc.
> "maybe you have your shell set up to go to the root directory" << I 
> don't know. How can it be done? How can I check?

Invoke Make with the "--debug=all" command-line switch, and post here
everything that it prints when running the following Makefile:

all:
	echo $(CURDIR)
	echo $(shell cd)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.