* configure.in (mandir): May as well include it in the NS app bundle.
[bpt/emacs.git] / Makefile.in
index edd6784..69757d5 100644 (file)
@@ -441,14 +441,9 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
 ## don't have to duplicate the list of utilities to install in
 ## this Makefile as well.
 
-## On AIX, use tar xBf.
-## On Xenix, use tar xpf.
+.PHONY: install
 
-.PHONY: install mkdir
-
-### We do install-arch-indep first because
-### the executable needs the Lisp files and DOC file to work properly.
-install: all install-arch-indep install-arch-dep install-leim blessmail
+install: all install-arch-indep install-arch-dep blessmail
        @true
 
 ## Ensure that $subdir contains a subdirs.el file.
@@ -467,11 +462,9 @@ write_subdir=if [ -f $${subdir}/subdirs.el ]; \
        fi
 
 ### Install the executables that were compiled specifically for this machine.
-### It would be nice to do something for a parallel make
-### to ensure that install-arch-indep finishes before this starts.
-### (TODO Why would it be nice?  Why not just make this depend on
-### install-arch-indep then?)
-install-arch-dep:
+### We do install-arch-indep first because the executable needs the
+### Lisp files and DOC file to work properly.
+install-arch-dep: install-arch-indep
        umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
        (cd lib-src; \
          $(MAKE) install $(MFLAGS) prefix=${prefix} \
@@ -495,6 +488,10 @@ install-arch-dep:
 ## icons (duplicates etc/images/icons/hicolor)
 ## man   (maybe we should be installing this one, like info)
 
+## This is install-etc for everything except self-contained-ns builds.
+## For them, it is empty.
+INSTALL_ARCH_INDEP_EXTRA = @INSTALL_ARCH_INDEP_EXTRA@
+
 ## 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} \
@@ -521,9 +518,6 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
 ## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
 ## (Note "otherwise" is inaccurate since 2009-08-23.)
 
-## If people complain about the h flag in tar command, take that out.
-## That flag is also used in leim/Makefile.in
-
 ## Note that the Makefiles in the etc directory are potentially useful
 ## in an installed Emacs, so should not be excluded.
 
@@ -532,14 +526,25 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
 ## place with their files read-only (perhaps because they are checked
 ## into RCS).  In order to make this safe, we make sure that the
 ## source exists and is distinct from the destination.
-install-arch-indep: mkdir info install-etc
+
+## I'm not sure creating locallisppath here serves any useful purpose.
+## If it has the default value, then the later write_subdir commands
+## will ensure all these components exist.
+## This will only do something if locallisppath has a non-standard value.
+## Is it really Emacs's job to create those directories?
+## Should we also be ensuring they contain subdirs.el files?
+## It would be easy to do, just use write_subdir.
+install-arch-indep: info install-leim ${INSTALL_ARCH_INDEP_EXTRA}
+       umask 022 ; \
+         $(MKDIR_P) $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
        -set ${COPYDESTS} ; \
        unset CDPATH; \
        $(set_installuser); \
        for dir in ${COPYDIR} ; do \
          [ -d $${dir} ] || exit 1 ; \
          dest=$$1 ; shift ; \
-         [ `(cd $${dest} && /bin/pwd)` = `(cd $${dir} && /bin/pwd)` ] && \
+         [ -d $${dest} ] && \
+           [ `(cd $${dest} && /bin/pwd)` = `(cd $${dir} && /bin/pwd)` ] && \
            continue ; \
          rm -rf $${dest} ; \
          umask 022; ${MKDIR_P} $${dest} ; \
@@ -569,6 +574,7 @@ install-arch-indep: mkdir info install-etc
        subdir=$(DESTDIR)${datadir}/emacs/site-lisp ; \
          ${write_subdir} || true
        -unset CDPATH; \
+       umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \
        if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \
        then \
           fullversion=`./src/emacs --version | sed -n '1 s/GNU Emacs *//p'`; \
@@ -579,7 +585,6 @@ install-arch-indep: mkdir info install-etc
             docfile="DOC"; \
           fi; \
           echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
-          umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \
           ${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \
           (cd $(DESTDIR)$(docdir); \
            $(set_installuser); \
@@ -663,17 +668,6 @@ install-leim: leim/Makefile
 install-strip:
        $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
 
-## Note sure this serves any useful purpose.
-## If locallisppath has the default value, then the write_subdir commands
-## in install-arch-indep will create all these components.
-## This will only do something if locallisppath has a non-standard value.
-## Is it really Emacs job to create those directories?
-## Should we also be ensuring they contain subdirs.el files?
-## It would be easy to do.
-mkdir: FRC
-       umask 022 ; \
-       $(MKDIR_P) $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
-
 ### Delete all the installed files that the `install' target would
 ### create (but not the noninstalled files such as `make all' would create).
 ###