[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Makefile.in: $LOGNAME and $USERNAME not always set
From: |
Stefan Monnier |
Subject: |
Re: Makefile.in: $LOGNAME and $USERNAME not always set |
Date: |
Fri, 26 Oct 2007 14:34:21 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
> There are some lines in Makefile.in running `chown' like this:
> ,----
> | find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\
> `----
> While in macosx, both LOGNAME and USERNAME is unset, thus I got lots of
> chown errors while `make install':
> ,----
> | usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
> | chown [-fhv] [-R [-H | -L | -P]] :group file ...
> `----
> I checked gnu/linux, solaris, they have set $LOGNAME, $USER; macosx has
> only set $USER. None of them have set $USERNAME. So it's problematic
> here, expecially on macosx. When $LOGNAME is empty, can we fall down to
> $USER instead?
Yes, $$USERNAME should probably be $$USER instead. Looks like
a typo/thinko.
This said, I'm surprised macosx doesn't define LOGNAME since AFAIK that's
the only official envvar (I seem to remember reading something along these
lines in POSIX or SUSv3).
Stefan