[Top][All Lists]

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

Re: Bug in builtin function abspath

From: Eli Zaretskii
Subject: Re: Bug in builtin function abspath
Date: Mon, 29 May 2006 22:19:18 +0300

> Date: Mon, 29 May 2006 09:50:03 +0200
> From: Alessandro Vesely <address@hidden>
> I though that, as $abspath is a function, it could be used much like pwd,
> i.e. get the path which is current at the time of the call so that
> one can refer to that frozen value even after changing directory.

It's possible to do that instead of what I did.  I simply am not sure
this is what the users will want.

Does someone else here have an opinion?  If so, please speak up.

> I can't grasp what you mean by _value at the time the result is used_.

Here's an example.  Suppose the current directory on drive D: is
initially d:/foo.  Now, consider this Makefile:

BAR = $(abspath d:bar)
        make -C d:/fubar mumble
        make BAR=$(BAR)

Since the first command changes PWD on drive D:, the second command
will do a "make BAR=d:./bar" with my code, which is the equivalent of
"make BAR=d:/fubar/bar".  OTOH, with your suggestion it will do a
"make BAR=d:/foo/bar" instead.

As I say above, I'm not sure what is the right way; I could go with
either one.  Opinions (and reasons) are highly appreciated.  TIA

reply via email to

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