[Top][All Lists]

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

[bug #42690] make unconditionally resolves the current directory

From: Paul D. Smith
Subject: [bug #42690] make unconditionally resolves the current directory
Date: Mon, 07 Jul 2014 05:01:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

Update of bug #42690 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 


Follow-up Comment #2:

The problem is make cannot find out what the path you used was.  Before make
is started, the "cd" will resolve the symbolic link and when make starts and
determines what its working directory is, that directory will be the final
destination.  Symbolic links are one-way: there is no way to "go back" through
the link.  Programs cannot tell how you got to the working directory, they
only know where there are now and they only know the real path of that

Only the parent shell, where the "cd" ran, can know that you used a symbolic
link to get where you are, rather than the "real" path.  Some shells will set
an environment variable, like "PWD", that contains the "virtual" path.  Some
do not.  Sometimes that variable will be exported so that programs like make
can see it.  Other times not.  It's not reliable, so make does not use it. 
However, if your shell does support this then you can use it yourself since
all environment variables are imported into make as make variables.  Of course
if someone uses your makefile and they do not use a shell that supports this,
then they won't be able to take advantage of it.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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