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

Re: Definition of alphanumeric?



On Mon, Apr 02, 2001 at 03:07:37AM -0500, Manoj Srivastava wrote:
>  >> PWD=`pwd`
> 
>  Adam> Btw, I think this is bad.  They should use CURDIR.
> __> echo $CURDIR
> 
> __> 
> 
> 	So, what is the provenance of this CURDIR variable? Has it
>  been blessed by POSIX? indeed not. However, I see that both $PWD and
>  the pwd utility are sanctioned by POSIX; so for maximal portability
>  scripts should *NOT* use  CURDIR, the should either use PWD, or call
>  pwd themselves, like the example did.

Note that this is probably not relevant to my problem. CURDIR is the same string
as PWD, it is not proetcted so it can be used in make rules like this:

foo: $(MYDIR)/bar

If $(MYDIR) is something with a : or %, make breaks. I don't know if it is
possible to make this work at all by quoting, but this is what you find in gawk
currently (with MYDIR being something evaluating to pwd, but chnaging it to
CURDIR doesn't change anythin).

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



Reply to: