[bug #42690] make unconditionally resolves the current directory

2014-07-06 Thread Paul D. Smith
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
directory.

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:

  http://savannah.gnu.org/bugs/?42690

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #42690] make unconditionally resolves the current directory

2014-07-05 Thread anonymous
URL:
  http://savannah.gnu.org/bugs/?42690

 Summary: make unconditionally resolves the current directory
 Project: make
Submitted by: None
Submitted on: Sat 05 Jul 2014 07:57:46 PM UTC
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: None
Operating System: None
   Fixed Release: None
   Triage Status: None

___

Details:

{ cd /tmp  mkdir a  ln -sT a b  cd b  make -w; }

make: Entering directory `/tmp/a'

Why not /tmp/b?  Is there an option to prevent this resolution?
I understand that relative path names must be resolved; 
but could you leave directory aliases as they are please?

This hit me when I tried to make in a directory that had a colon in the name;

this caused targets containing $(CURDIR) to be split and resulted in an
error;
I made a symbolic link to avoid the path with colon but it did not work;
make decided it would rather use the original path instead.

And, last but not least, this behaviour is undocumented 
(at least in the info file).





___

Reply to this item at:

  http://savannah.gnu.org/bugs/?42690

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[bug #42690] make unconditionally resolves the current directory

2014-07-05 Thread Christopher Yeleighton
Follow-up Comment #1, bug #42690 (project make):




 


___

Reply to this item at:

  http://savannah.gnu.org/bugs/?42690

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #42690] make unconditionally resolves the current directory

2014-07-05 Thread Philip Guenther
On Sat, Jul 5, 2014 at 12:57 PM, anonymous invalid.nore...@gnu.org wrote:

 { cd /tmp  mkdir a  ln -sT a b  cd b  make -w; }

 make: Entering directory `/tmp/a'

 Why not /tmp/b?  Is there an option to prevent this resolution?
 I understand that relative path names must be resolved;
 but could you leave directory aliases as they are please?


The best make would be able to do would be to model its behavior on that of
pwd -L: if the PWD environment variable is set to an absolute path with
no .. or . components that resolves to the process's current directory,
then use that instead of the path from getcwd().


This hit me when I tried to make in a directory that had a colon in the
 name;


Doctor says: Don't do that!   make is only one of many program which you
will have problems with.


Philip Guenther
___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make