X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/5a6a83f216e499e598bc95d2ae6b820ae004ea6c..7ea27e3247dc1b8a56f373084521445ba8ebe4cc:/Makefile.in diff --git a/Makefile.in b/Makefile.in index acf865239f..e50e869690 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,8 @@ # DIST: that first. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -# 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -138,11 +139,11 @@ man1dir=$(mandir)/man1 # since there are now many packages documented with the texinfo # system, it is inappropriate to imply that it is part of Emacs. infodir=@infodir@ -INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \ - elisp eintr emacs emacs-mime eshell eudc flymake \ - forms gnus idlwave info message mh-e newsticker org pcl-cvs \ - pgg reftex sc ses sieve speedbar tramp vip viper widget \ - woman smtpmail url rcirc erc +INFO_FILES=ada-mode autotype calc ccmode cl dbus dired-x ebrowse ediff \ + efaq eintr elisp emacs emacs-mime epa erc eshell eudc \ + flymake forms gnus idlwave info message mh-e newsticker \ + nxml-mode org pcl-cvs pgg rcirc reftex remember sc ses sieve \ + speedbar tramp vip viper widget woman smtpmail url # Directory for local state files for all programs. localstatedir=@localstatedir@ @@ -170,6 +171,15 @@ x_default_search_path=@x_default_search_path@ # Location to install Emacs.app on Mac OS X carbon_appdir=@carbon_appdir@ +# Where the etc/emacs.desktop file is to be installed. +desktopdir=$(datarootdir)/applications + +# Where the etc/images/icons/hicolor directory is to be installed. +icondir=$(datarootdir)/icons + +# The source directory for the icon files. +iconsrcdir=$(srcdir)/etc/images/icons + # ==================== Emacs-specific directories ==================== # These variables hold the values Emacs will actually use. They are @@ -407,6 +417,13 @@ install-arch-dep: mkdir && cat > /dev/null))) || exit 1; \ fi +## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html +## Needs to be the user running install, so configure can't set it. +set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ + `id -un 2> /dev/null`; do \ + [ -n "$${installuser}" ] && break ; \ + done + ### Install the files that are machine-independent. ### Most of them come straight from the distribution; ### the exception is the DOC-* files, which are copied @@ -423,7 +440,8 @@ install-arch-dep: mkdir ## Note that the Makefiles in the etc directory are potentially useful ## in an installed Emacs, so should not be excluded. -install-arch-indep: mkdir info + +install-arch-indep: mkdir info install-etc -set ${COPYDESTS} ; \ unset CDPATH; \ for dir in ${COPYDIR} ; do \ @@ -436,6 +454,7 @@ install-arch-indep: mkdir info mkdir ${COPYDESTS} ; \ chmod ugo+rx ${COPYDESTS} ; \ unset CDPATH; \ + $(set_installuser); \ for dir in ${COPYDIR} ; do \ dest=$$1 ; shift ; \ [ -d $${dir} ] \ @@ -444,7 +463,7 @@ install-arch-indep: mkdir info (cd $${dir}; tar -chf - . ) \ | (cd $${dest}; umask 022; \ tar -xvf - && cat > /dev/null) || exit 1; \ - find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\ + find $${dest} -exec chown $${installuser} {} ';' ;\ for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \ chmod a+rx $${subdir} ; \ rm -rf $${subdir}/RCS ; \ @@ -492,7 +511,9 @@ install-arch-indep: mkdir info echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \ (cd ./etc; tar -chf - $${docfile}) \ |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ - (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \ + (cd $(DESTDIR)$(docdir); \ + $(set_installuser); \ + chown $${installuser} DOC*; chmod a+r DOC*; \ if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \ else true; fi -unset CDPATH; \ @@ -504,7 +525,9 @@ install-arch-indep: mkdir info echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \ (cd lisp; tar -chf - *.el *.elc) \ |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ - (cd $(DESTDIR)${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \ + (cd $(DESTDIR)${lispdir}; \ + $(set_installuser); \ + find . -exec chown $${installuser} {} ';') ; \ else true; fi -unset CDPATH; \ if [ -n "${GZIP_PROG}" ]; \ @@ -551,6 +574,18 @@ install-arch-indep: mkdir info chmod a+r $(DESTDIR)${man1dir}/$${page}${manext}); \ done +## Install those items from etc/ that need to end up elsewhere. +install-etc: mkdir + ${INSTALL_DATA} ${srcdir}/etc/emacs.desktop \ + $(DESTDIR)${desktopdir}/emacs.desktop + for icon in $(iconsrcdir)/*/*x*/apps/*.* \ + $(iconsrcdir)/*/scalable/apps/*.*; do \ + if [ -r $${icon} ]; then \ + iicon=`echo "$${icon}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},'` ; \ + ${INSTALL_DATA} $${icon} $${iicon} ; \ + fi ; \ + done + ### Install LEIM files. Although they are machine-independent, we ### have separate target here instead of including it in ### `install-arch-indep'. People who extracted LEIM files after they @@ -571,11 +606,19 @@ mkdir: FRC $(srcdir)/mkinstalldirs $(DESTDIR)${datadir}; \ chmod a+r $(DESTDIR)${datadir};\ fi + icondirs= ; \ + for dir in $(iconsrcdir)/*/*x*/apps $(iconsrcdir)/*/scalable/apps; do \ + if [ -d $${dir} ]; then \ + icondirs="$${icondirs} $${dir}" ; \ + fi ; \ + done ; \ + icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \ $(srcdir)/mkinstalldirs ${COPYDESTS} $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \ $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \ $(DESTDIR)${datadir}/emacs/site-lisp \ $(DESTDIR)${datadir}/emacs/${version}/site-lisp \ - $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'` + $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'` \ + $(DESTDIR)${desktopdir} $${icondirs} ### Delete all the installed files that the `install' target would ### create (but not the noninstalled files such as `make all' would @@ -733,6 +776,24 @@ info: force-info -(cd doc/misc; $(MAKE) $(MFLAGS) info) -(cd doc/lispref; $(MAKE) $(MFLAGS) info) -(cd doc/lispintro; $(MAKE) $(MFLAGS) info) + +# The info/dir file must be updated by hand when new manuals are added. +check-info-dir: info + cd info ; \ + missing= ; \ + for file in *; do \ + test -f "$${file}" || continue ; \ + case $${file} in \ + *-[0-9]*|COPYING|dir) continue ;; \ + esac ; \ + grep -q -F ": ($${file})." dir || missing="$${missing} $${file}" ; \ + done ; \ + if test -n "$${missing}"; then \ + echo "Missing info/dir entries: $${missing}" ; \ + exit 1 ; \ + fi ; \ + echo "info/dir is OK" + dvi: (cd doc/emacs; $(MAKE) $(MFLAGS) dvi) (cd doc/misc; $(MAKE) $(MFLAGS) dvi) @@ -756,7 +817,6 @@ maybe_bootstrap: if [ \( "$$bar" = '$(srcdir)/lisp/*.elc' \) -o \( "$$bar" = '' \) ]; then \ echo "Your tree does not include the compiled Lisp files."; \ echo "You need to do \`make bootstrap' to build Emacs."; \ - echo "Emacs now requires Texinfo version 4.2."; \ exit 1;\ fi @@ -791,3 +851,13 @@ bootstrap-clean-before-fast: FRC -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) (cd leim; $(MAKE) $(MFLAGS) clean) + +.PHONY: check-declare + +check-declare: + @if [ ! -e $(srcdir)/src/emacs ]; then \ + echo "You must build Emacs to use this command"; \ + exit 1; \ + fi + (cd leim; $(MAKE) $(MFLAGS) $@) + (cd lisp; $(MAKE) $(MFLAGS) $@)