aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Makefile.in27
2 files changed, 13 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index df7e99cf069..787cfd7c81a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
12008-02-21 Glenn Morris <rgm@gnu.org> 12008-02-21 Glenn Morris <rgm@gnu.org>
2 2
3 * Makefile.in (set_installuser): New.
4 (install-arch-indep): Use set_installuser to avoid duplicate code.
5
3 * README.unicode: Split into admin/notes/unicode,font-backend and 6 * README.unicode: Split into admin/notes/unicode,font-backend and
4 remove. 7 remove.
5 8
diff --git a/Makefile.in b/Makefile.in
index 8adddf4df5a..721883e9943 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -414,6 +414,13 @@ install-arch-dep: mkdir
414 && cat > /dev/null))) || exit 1; \ 414 && cat > /dev/null))) || exit 1; \
415 fi 415 fi
416 416
417## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html
418## Needs to be the user running install, so configure can't set it.
419set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
420 `id -un 2> /dev/null`; do \
421 [ -n "$${installuser}" ] && break ; \
422 done
423
417### Install the files that are machine-independent. 424### Install the files that are machine-independent.
418### Most of them come straight from the distribution; 425### Most of them come straight from the distribution;
419### the exception is the DOC-* files, which are copied 426### the exception is the DOC-* files, which are copied
@@ -431,11 +438,6 @@ install-arch-dep: mkdir
431## Note that the Makefiles in the etc directory are potentially useful 438## Note that the Makefiles in the etc directory are potentially useful
432## in an installed Emacs, so should not be excluded. 439## in an installed Emacs, so should not be excluded.
433 440
434## installuser:
435## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html
436## Nuisance because i) it needs to be the user running install, so
437## configure can't set it; ii) can't (?) use the result of rule
438## commands to set make variables.
439install-arch-indep: mkdir info install-etc 441install-arch-indep: mkdir info install-etc
440 -set ${COPYDESTS} ; \ 442 -set ${COPYDESTS} ; \
441 unset CDPATH; \ 443 unset CDPATH; \
@@ -449,10 +451,7 @@ install-arch-indep: mkdir info install-etc
449 mkdir ${COPYDESTS} ; \ 451 mkdir ${COPYDESTS} ; \
450 chmod ugo+rx ${COPYDESTS} ; \ 452 chmod ugo+rx ${COPYDESTS} ; \
451 unset CDPATH; \ 453 unset CDPATH; \
452 for installuser in $${LOGNAME} $${USERNAME} $${USER} \ 454 $(set_installuser); \
453 `id -un 2> /dev/null`; do \
454 [ -n "$${installuser}" ] && break ; \
455 done ; \
456 for dir in ${COPYDIR} ; do \ 455 for dir in ${COPYDIR} ; do \
457 dest=$$1 ; shift ; \ 456 dest=$$1 ; shift ; \
458 [ -d $${dir} ] \ 457 [ -d $${dir} ] \
@@ -510,10 +509,7 @@ install-arch-indep: mkdir info install-etc
510 (cd ./etc; tar -chf - $${docfile}) \ 509 (cd ./etc; tar -chf - $${docfile}) \
511 |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ 510 |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
512 (cd $(DESTDIR)$(docdir); \ 511 (cd $(DESTDIR)$(docdir); \
513 for installuser in $${LOGNAME} $${USERNAME} $${USER} \ 512 $(set_installuser); \
514 `id -un 2> /dev/null`; do \
515 [ -n "$${installuser}" ] && break ; \
516 done ; \
517 chown $${installuser} DOC*; chmod a+r DOC*; \ 513 chown $${installuser} DOC*; chmod a+r DOC*; \
518 if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \ 514 if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
519 else true; fi 515 else true; fi
@@ -527,10 +523,7 @@ install-arch-indep: mkdir info install-etc
527 (cd lisp; tar -chf - *.el *.elc) \ 523 (cd lisp; tar -chf - *.el *.elc) \
528 |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ 524 |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
529 (cd $(DESTDIR)${lispdir}; \ 525 (cd $(DESTDIR)${lispdir}; \
530 for installuser in $${LOGNAME} $${USERNAME} $${USER} \ 526 $(set_installuser); \
531 `id -un 2> /dev/null`; do \
532 [ -n "$${installuser}" ] && break ; \
533 done ; \
534 find . -exec chown $${installuser} {} ';') ; \ 527 find . -exec chown $${installuser} {} ';') ; \
535 else true; fi 528 else true; fi
536 -unset CDPATH; \ 529 -unset CDPATH; \