diff options
| author | Glenn Morris | 2012-05-17 23:39:52 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-05-17 23:39:52 -0700 |
| commit | 7606c36016cffd5d7a09fb440c4c9fd91c099596 (patch) | |
| tree | ac92b68b07208bd9e2b918e3903920a660aa177e | |
| parent | ed4affe121c26ea1a1bf9fadc44a85b9e81e4a58 (diff) | |
| download | emacs-7606c36016cffd5d7a09fb440c4c9fd91c099596.tar.gz emacs-7606c36016cffd5d7a09fb440c4c9fd91c099596.zip | |
* Makefile.in (install-arch-indep): Combine adjacent loops.
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | Makefile.in | 76 |
2 files changed, 39 insertions, 41 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-05-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (install-arch-indep): Combine adjacent loops. | ||
| 4 | |||
| 1 | 2012-05-17 Glenn Morris <rgm@gnu.org> | 5 | 2012-05-17 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * Makefile.in (install-etc, mkdir): | 7 | * Makefile.in (install-etc, mkdir): |
diff --git a/Makefile.in b/Makefile.in index d2a8db90854..4398fe55cba 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -446,17 +446,16 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS) | |||
| 446 | 446 | ||
| 447 | .PHONY: install mkdir | 447 | .PHONY: install mkdir |
| 448 | 448 | ||
| 449 | ## We delete each directory in ${COPYDESTS} before we copy into it; | ||
| 450 | ## that way, we can reinstall over directories that have been put in | ||
| 451 | ## place with their files read-only (perhaps because they are checked | ||
| 452 | ## into RCS). In order to make this safe, we make sure that the | ||
| 453 | ## source exists and is distinct from the destination. | ||
| 454 | ### We do install-arch-indep first because | 449 | ### We do install-arch-indep first because |
| 455 | ### the executable needs the Lisp files and DOC file to work properly. | 450 | ### the executable needs the Lisp files and DOC file to work properly. |
| 456 | install: all install-arch-indep install-arch-dep install-leim blessmail | 451 | install: all install-arch-indep install-arch-dep install-leim blessmail |
| 457 | @true | 452 | @true |
| 458 | 453 | ||
| 459 | ## Ensure that $subdir contains a subdirs.el file. | 454 | ## Ensure that $subdir contains a subdirs.el file. |
| 455 | ## Here and elsewhere, we set the umask so that any created files are | ||
| 456 | ## world-readable. | ||
| 457 | ## TODO it might be good to warn about non-standard permissions of | ||
| 458 | ## pre-existing directories, but that does not seem easy. | ||
| 460 | write_subdir=if [ -f $${subdir}/subdirs.el ]; \ | 459 | write_subdir=if [ -f $${subdir}/subdirs.el ]; \ |
| 461 | then true; \ | 460 | then true; \ |
| 462 | else \ | 461 | else \ |
| @@ -527,42 +526,40 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ | |||
| 527 | ## Note that the Makefiles in the etc directory are potentially useful | 526 | ## Note that the Makefiles in the etc directory are potentially useful |
| 528 | ## in an installed Emacs, so should not be excluded. | 527 | ## in an installed Emacs, so should not be excluded. |
| 529 | 528 | ||
| 529 | ## We delete each directory in ${COPYDESTS} before we copy into it; | ||
| 530 | ## that way, we can reinstall over directories that have been put in | ||
| 531 | ## place with their files read-only (perhaps because they are checked | ||
| 532 | ## into RCS). In order to make this safe, we make sure that the | ||
| 533 | ## source exists and is distinct from the destination. | ||
| 530 | install-arch-indep: mkdir info install-etc | 534 | install-arch-indep: mkdir info install-etc |
| 531 | -set ${COPYDESTS} ; \ | 535 | -set ${COPYDESTS} ; \ |
| 532 | unset CDPATH; \ | 536 | unset CDPATH; \ |
| 533 | for dir in ${COPYDIR} ; do \ | ||
| 534 | if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \ | ||
| 535 | rm -rf $$1 ; \ | ||
| 536 | fi ; \ | ||
| 537 | shift ; \ | ||
| 538 | done | ||
| 539 | -set ${COPYDESTS} ; \ | ||
| 540 | mkdir ${COPYDESTS} ; \ | ||
| 541 | chmod ugo+rx ${COPYDESTS} ; \ | ||
| 542 | unset CDPATH; \ | ||
| 543 | $(set_installuser); \ | 537 | $(set_installuser); \ |
| 544 | for dir in ${COPYDIR} ; do \ | 538 | for dir in ${COPYDIR} ; do \ |
| 539 | [ -d $${dir} ] || exit 1 ; \ | ||
| 545 | dest=$$1 ; shift ; \ | 540 | dest=$$1 ; shift ; \ |
| 546 | [ -d $${dir} ] \ | 541 | [ `(cd $${dest} && /bin/pwd)` = `(cd $${dir} && /bin/pwd)` ] && \ |
| 547 | && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \ | 542 | continue ; \ |
| 548 | && (echo "Copying $${dir} to $${dest}..." ; \ | 543 | rm -rf $${dest} ; \ |
| 549 | (cd $${dir}; tar -chf - . ) \ | 544 | umask 022; ${MKDIR_P} $${dest} ; \ |
| 550 | | (cd $${dest}; umask 022; \ | 545 | (echo "Copying $${dir} to $${dest}..." ; \ |
| 551 | tar -xvf - && cat > /dev/null) || exit 1; \ | 546 | (cd $${dir}; tar -chf - . ) \ |
| 552 | find $${dest} -exec chown $${installuser} {} ';' ;\ | 547 | | (cd $${dest}; umask 022; \ |
| 553 | for subdir in `find $${dest} -type d -print` ; do \ | 548 | tar -xvf - && cat > /dev/null) || exit 1; \ |
| 554 | chmod a+rx $${subdir} ; \ | 549 | find $${dest} -exec chown $${installuser} {} ';' ;\ |
| 555 | rm -f $${subdir}/.gitignore ; \ | 550 | for subdir in `find $${dest} -type d -print` ; do \ |
| 556 | rm -f $${subdir}/.arch-inventory ; \ | 551 | chmod a+rx $${subdir} ; \ |
| 557 | rm -f $${subdir}/.DS_Store ; \ | 552 | rm -f $${subdir}/.gitignore ; \ |
| 558 | rm -f $${subdir}/\#* ; \ | 553 | rm -f $${subdir}/.arch-inventory ; \ |
| 559 | rm -f $${subdir}/.\#* ; \ | 554 | rm -f $${subdir}/.DS_Store ; \ |
| 560 | rm -f $${subdir}/*~ ; \ | 555 | rm -f $${subdir}/\#* ; \ |
| 561 | rm -f $${subdir}/*.orig ; \ | 556 | rm -f $${subdir}/.\#* ; \ |
| 562 | [ "$${dir}" != "${srcdir}/etc" ] && \ | 557 | rm -f $${subdir}/*~ ; \ |
| 563 | rm -f $${subdir}/[mM]akefile*[.-]in $${subdir}/[mM]akefile ; \ | 558 | rm -f $${subdir}/*.orig ; \ |
| 564 | rm -f $${subdir}/ChangeLog* ; \ | 559 | [ "$${dir}" != "${srcdir}/etc" ] && \ |
| 565 | done) ; \ | 560 | rm -f $${subdir}/[mM]akefile*[.-]in $${subdir}/[mM]akefile ; \ |
| 561 | rm -f $${subdir}/ChangeLog* ; \ | ||
| 562 | done) ; \ | ||
| 566 | done | 563 | done |
| 567 | -rm -f $(DESTDIR)${lispdir}/subdirs.el | 564 | -rm -f $(DESTDIR)${lispdir}/subdirs.el |
| 568 | $(srcdir)/update-subdirs $(DESTDIR)${lispdir} | 565 | $(srcdir)/update-subdirs $(DESTDIR)${lispdir} |
| @@ -641,16 +638,16 @@ install-etc: | |||
| 641 | umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir} | 638 | umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir} |
| 642 | ${INSTALL_DATA} ${srcdir}/etc/emacs.desktop \ | 639 | ${INSTALL_DATA} ${srcdir}/etc/emacs.desktop \ |
| 643 | $(DESTDIR)${desktopdir}/emacs.desktop | 640 | $(DESTDIR)${desktopdir}/emacs.desktop |
| 644 | thisdir=`/bin/pwd` ; \ | 641 | thisdir=`/bin/pwd`; \ |
| 645 | cd ${iconsrcdir} || exit 1; umask 022 ; \ | 642 | cd ${iconsrcdir} || exit 1; umask 022 ; \ |
| 646 | for dir in */*/apps */*/mimetypes; do \ | 643 | for dir in */*/apps */*/mimetypes; do \ |
| 647 | [ -d $${dir} ] || continue ; \ | 644 | [ -d $${dir} ] || continue ; \ |
| 648 | ( cd $${thisdir}; ${MKDIR_P} ${icondir}/$${dir} ) ; \ | 645 | ( cd $${thisdir}; ${MKDIR_P} ${icondir}/$${dir} ) ; \ |
| 649 | for icon in $${dir}/*.*; do \ | 646 | for icon in $${dir}/*.*; do \ |
| 650 | [ -r $${icon} ] || continue ; \ | 647 | [ -r $${icon} ] || continue ; \ |
| 651 | ( cd $${thisdir} ; \ | 648 | ( cd $${thisdir}; \ |
| 652 | ${INSTALL_DATA} ${iconsrcdir}/$${icon} ${icondir}/$${icon} ) \ | 649 | ${INSTALL_DATA} ${iconsrcdir}/$${icon} ${icondir}/$${icon} ) \ |
| 653 | || exit 1 ; \ | 650 | || exit 1; \ |
| 654 | done ; \ | 651 | done ; \ |
| 655 | done | 652 | done |
| 656 | 653 | ||
| @@ -666,9 +663,6 @@ install-strip: | |||
| 666 | $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install | 663 | $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install |
| 667 | 664 | ||
| 668 | ### Build some of the directories we're going to install Emacs in. | 665 | ### Build some of the directories we're going to install Emacs in. |
| 669 | ### We set the umask so that any created directories are world-readable. | ||
| 670 | ### FIXME it would be good to warn about non-standard permissions of | ||
| 671 | ### pre-existing directories, but that does not seem easy. | ||
| 672 | mkdir: FRC | 666 | mkdir: FRC |
| 673 | umask 022 ; \ | 667 | umask 022 ; \ |
| 674 | $(MKDIR_P) $(DESTDIR)${datadir} ${COPYDESTS} \ | 668 | $(MKDIR_P) $(DESTDIR)${datadir} ${COPYDESTS} \ |