unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Makefile.in: $LOGNAME and $USERNAME not always set
@ 2007-10-26  7:24 William Xu
  2007-10-26 18:34 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: William Xu @ 2007-10-26  7:24 UTC (permalink / raw)
  To: emacs-devel

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?

-- 
William

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Makefile.in: $LOGNAME and $USERNAME not always set
  2007-10-26  7:24 Makefile.in: $LOGNAME and $USERNAME not always set William Xu
@ 2007-10-26 18:34 ` Stefan Monnier
  2007-10-27  2:13   ` CHENG Gao
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2007-10-26 18:34 UTC (permalink / raw)
  To: William Xu; +Cc: emacs-devel

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Makefile.in: $LOGNAME and $USERNAME not always set
  2007-10-26 18:34 ` Stefan Monnier
@ 2007-10-27  2:13   ` CHENG Gao
  0 siblings, 0 replies; 3+ messages in thread
From: CHENG Gao @ 2007-10-27  2:13 UTC (permalink / raw)
  To: emacs-devel

*On Fri, 26 Oct 2007 14:34:21 -0400
* Stefan Monnier <monnier@iro.umontreal.ca> climbed out of the dark hell and cried out:

> 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).

At least not for me. I am using MacOSX 10.4.10 and "env" shows $LOGNAME
there, and $USER.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-27  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26  7:24 Makefile.in: $LOGNAME and $USERNAME not always set William Xu
2007-10-26 18:34 ` Stefan Monnier
2007-10-27  2:13   ` CHENG Gao

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).