* lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): Fix edebug spec.
[bpt/emacs.git] / Makefile.in
index f5bc0ce..0b1fb77 100644 (file)
@@ -2,7 +2,7 @@
 # DIST: make most of the changes to this file you might want, so try
 # DIST: that first.
 
-# Copyright (C) 1992-201 Free Software Foundation, Inc.
+# Copyright (C) 1992-2012 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -66,6 +66,11 @@ CDPATH=
 
 # ==================== Things `configure' Might Edit ====================
 
+MAINTAINER_MODE_FLAG = --disable-maintainer-mode
+@MAINT@MAINTAINER_MODE_FLAG = --enable-maintainer-mode
+cache_file = @cache_file@
+CONFIGURE_FLAGS = --cache-file=$(cache_file) $(MAINTAINER_MODE_FLAG)
+
 CC=@CC@
 CFLAGS=@CFLAGS@
 LDFLAGS=@LDFLAGS@
@@ -117,25 +122,15 @@ sharedstatedir=@sharedstatedir@
 libexecdir=@libexecdir@
 
 # Where to install Emacs's man pages.
-# This used to allow choice of the numeric extension, but this made
-# little sense since the files were always installed in man1/
-# (and they contain cross-references that expect them to be there).
+# Note they contain cross-references that expect them to be in section 1.
 mandir=@mandir@
 man1dir=$(mandir)/man1
-MAN_PAGES=ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \
-          grep-changelog.1 rcs-checkin.1
 
-# Where to install and expect the info files describing Emacs. In the
-# past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
-# since there are now many packages documented with the texinfo
-# system, it is inappropriate to imply that it is part of Emacs.
+# Where to install and expect the info files describing Emacs.
 infodir=@infodir@
-INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse  \
-           ede ediff edt eieio efaq eintr elisp emacs emacs-mime epa erc \
-          ert eshell eudc flymake forms gnus idlwave info mairix-el    \
-          message mh-e newsticker nxml-mode org pcl-cvs pgg rcirc      \
-          reftex remember sasl sc semantic ses sieve smtpmail speedbar \
-          tramp url vip viper widget woman
+# Info files not in the doc/misc directory (we get those via make echo-info).
+INFO_EXT=@INFO_EXT@
+INFO_NONMISC=emacs$(INFO_EXT) eintr$(INFO_EXT) elisp$(INFO_EXT)
 
 # If no makeinfo was found and configured --without-makeinfo, "no"; else "yes".
 HAVE_MAKEINFO=@HAVE_MAKEINFO@
@@ -203,11 +198,8 @@ lisppath=@lisppath@
 # building.  This is only used during the process of
 # compiling Emacs, to help Emacs find its lisp files
 # before they've been installed in their final location.
-# It's usually identical to lisppath, except that
-# it does not include locallisppath, and the
-# entry for the directory containing the installed lisp
-# files has been replaced with ../lisp.  This should be a
-# colon-separated list of directories.
+# This should be a colon-separated list of directories.
+# Normally it points to the lisp/ directory in the sources.
 buildlisppath=${srcdir}/lisp
 
 # Where to install the other architecture-independent
@@ -234,12 +226,18 @@ gamedir=@gamedir@
 # ==================== Utility Programs for the Build ====================
 
 # Allow the user to specify the install program.
+# Note that if the system does not provide a suitable install,
+# configure will use build-aux/install-sh.  Annoyingly, it does
+# not use an absolute path.  So we must take care to always run
+# INSTALL-type commands from the directory containing the Makefile.
+# This explains (I think) the cd thisdir seen in several install rules.
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_INFO = @INSTALL_INFO@
 # By default, we uphold the dignity of our programs.
 INSTALL_STRIP =
+MKDIR_P = @MKDIR_P@
 
 # We use gzip to compress installed .el files.
 GZIP_PROG = @GZIP_PROG@
@@ -307,9 +305,7 @@ epaths-force: FRC
 # running more than 1 process in the leim directory, especially for
 # the $TIT files there.
 leim:   src Makefile FRC
-       (export PARALLEL; PARALLEL=0; cd $@; $(MAKE) all $(MFLAGS) \
-         CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
-         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}')
+       cd leim && PARALLEL=0 $(MAKE) all $(MFLAGS)
 
 lib-src src: lib
 
@@ -336,10 +332,11 @@ GNULIB_MODULES = \
   careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
   dup2 \
   filemode getloadavg getopt-gnu ignore-value intprops lstat \
-  mktime pthread_sigmask readlink \
-  socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
+  manywarnings mktime pthread_sigmask readlink \
+  socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat \
+  warnings
 GNULIB_TOOL_FLAGS = \
- --avoid=msvc-inval --avoid=msvc-nothrow --avoid=pathmax \
+ --avoid=msvc-inval --avoid=msvc-nothrow \
  --avoid=raise --avoid=threadlib \
  --conditional-dependencies --import --no-changelog --no-vc-files \
  --makefile-name=gnulib.mk
@@ -404,7 +401,7 @@ config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
        if [ -x ./config.status ]; then \
            ./config.status --recheck;  \
        else                            \
-           ./configure;                \
+           ./configure $(CONFIGURE_FLAGS); \
        fi
 
 AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
@@ -459,6 +456,8 @@ MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
 ### 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: mkdir
        (cd lib-src; \
          $(MAKE) install $(MFLAGS) prefix=${prefix} \
@@ -472,18 +471,17 @@ install-arch-dep: mkdir
        if test "${ns_appresdir}" != ""; then \
          ( cd ${ns_appresdir} ; \
            if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
-           if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \
+           if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \
            rm -fr share ) ; \
-         ( cd ${ns_appbindir}libexec ; dir=emacs/*/*/* ; $(MV_DIRS); \
-           rm -fr emacs ) ; \
-         ( cd ${ns_appbindir}bin ; rm -f emacs emacs-24* ; \
-           ln -sf ../libexec/* .) ; \
+         ( if cd ${ns_appbindir}/libexec ; then \
+             mv -f emacs/${version}/${configuration}/* . ; rm -fr emacs ; \
+             rm -f ../bin/emacs ../bin/$(EMACSFULL) ; \
+           fi ) ; \
        else true ; fi
 
-## FIXME is the emacs-24* bit above really necessary and correct?
-## What if I have 24.1 and 24.2 installed at the same time?
-## In any case, it should use something like echo $version | sed 's/\..*//'
-## instead of hard-coding a version.
+## FIXME NS self-contained: rather than installing emacs and
+## EMACSFULL, then deleting them, obviously it would be better to not
+## install them in the first place.
 
 ## 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.
@@ -499,9 +497,17 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
 
 ## Note that we copy DOC* and then delete DOC
 ## as a workaround for a bug in tar on Ultrix 4.2.
+## Ultrix is no longer supported since 23.1, but the relevant line
+## has another effect.  We copy the entire etc/ directory from the
+## source tree first.  For an in-tree build, this will include
+## any DOC* files there may be.  So rm DOC does have an effect.
+## FIXME When we copy etc we should exclude DOC*, then copy only
+## the relevant one.  We cannot delete DOC* from the destination directory,
+## because that may include pre-existing files from another emacs.
 
 ## We install only the relevant DOC file if possible
 ## (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
@@ -542,8 +548,7 @@ install-arch-indep: mkdir info install-etc
                rm -f  $${subdir}/*~ ; \
                rm -f  $${subdir}/*.orig ; \
                [ "$${dir}" != "${srcdir}/etc" ] && \
-                rm -f $${subdir}/[mM]akefile*.c $${subdir}/[mM]akefile*[.-]in \
-                  $${subdir}/[mM]akefile ; \
+                rm -f $${subdir}/[mM]akefile*[.-]in $${subdir}/[mM]akefile ; \
                rm -f  $${subdir}/ChangeLog* ; \
              done) ; \
        done
@@ -576,27 +581,13 @@ install-arch-indep: mkdir info install-etc
             docfile="DOC"; \
           fi; \
           echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
-          (cd ./etc; tar -chf - $${docfile}) \
-            |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
+          ${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \
           (cd $(DESTDIR)$(docdir); \
            $(set_installuser); \
-           chown $${installuser} DOC*; chmod a+r DOC*; \
+           chown $${installuser} DOC*; \
            if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
        else true; fi
        -unset CDPATH; \
-       if [ -r ./lisp ] \
-          && [ -r ./lisp/simple.el ] \
-          && [ x`(cd ./lisp; /bin/pwd)` != x`(cd $(DESTDIR)${lispdir}; /bin/pwd)` ] \
-          && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
-       then \
-          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}; \
-           $(set_installuser); \
-           find . -exec chown $${installuser} {} ';') ; \
-       else true; fi
-       -unset CDPATH; \
        if [ -n "${GZIP_PROG}" ]; \
        then \
           echo "Compressing *.el ..." ; \
@@ -615,33 +606,27 @@ install-arch-indep: mkdir info install-etc
              ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir; \
              chmod a+r $(DESTDIR)${infodir}/dir); \
           fi; \
+          info_misc=`cd $${thisdir}/doc/misc; ${MAKE} echo-info | sed '/ing directory/d'`; \
           cd ${srcdir}/info ; \
-          for elt in $(INFO_FILES); do \
+          for elt in ${INFO_NONMISC} $${info_misc}; do \
              test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
              for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
-               ${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f; \
+              (cd $${thisdir}; \
+               ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
                chmod a+r $(DESTDIR)${infodir}/$$f; \
                if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
                  rm -f $(DESTDIR)${infodir}/$$f.gz; \
                  ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
                else true; fi; \
              done; \
+            (cd $${thisdir}; \
+             ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
           done); \
        else true; fi
-       -unset CDPATH; \
-       thisdir=`/bin/pwd`; \
-       if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
-       then \
-         for elt in $(INFO_FILES); do \
-           test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
-           (cd $${thisdir}; \
-            ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
-         done; \
-       else true; fi
        -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
        thisdir=`/bin/pwd`; \
        cd ${mansrcdir}; \
-       for page in ${MAN_PAGES}; do \
+       for page in *.1; do \
          (cd $${thisdir}; \
           ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${page}; \
           chmod a+r $(DESTDIR)${man1dir}/$${page}; \
@@ -666,18 +651,15 @@ install-etc: mkdir
 ### 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
-### insalled Emacs itself can install only LEIM files by this target.
+### installed Emacs itself can install only LEIM files by this target.
 install-leim: leim/Makefile mkdir
-       cd leim; $(MAKE) install
+       cd leim && $(MAKE) $(MFLAGS) install
 
 ### Build Emacs and install it, stripping binaries while installing them.
 install-strip:
-       $(MAKE) INSTALL_STRIP=-s install
+       $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
 
-### Build all the directories we're going to install Emacs in. Since
-### we may be creating several layers of directories (for example,
-### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d
-### instead of mkdir.  Not all systems' mkdir programs have the `-p' flag.
+### Build all the directories we're going to install Emacs in.
 ### We set the umask so that any created directories are world-readable.
 ### FIXME it would be good to warn about non-standard permissions of
 ### pre-existing directories, but that does not seem easy.
@@ -690,7 +672,7 @@ mkdir: FRC
        done ; \
        icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \
        umask 022 ; \
-       $(srcdir)/build-aux/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \
+       $(MKDIR_P) $(DESTDIR)${datadir} ${COPYDESTS} \
          $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
          $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
          $(DESTDIR)${datadir}/emacs/site-lisp \
@@ -722,14 +704,20 @@ uninstall:
          fi ;                                          \
        done
        -rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
-       (cd $(DESTDIR)${infodir} && \
-         for elt in $(INFO_FILES); do \
-           $(INSTALL_INFO) --remove --info-dir=. $$elt; \
-           for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
-             rm -f $$f; \
-           done; \
+       thisdir=`/bin/pwd`; \
+       (info_misc=`cd doc/misc; ${MAKE} echo-info | sed '/ing directory/d'`; \
+         cd $(DESTDIR)${infodir} && \
+         for elt in ${INFO_NONMISC} $${info_misc}; do \
+           (cd $${thisdir}; \
+            $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
+           if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
+              ext=.gz; else ext=; fi; \
+           rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
          done;)
-       (cd $(DESTDIR)${man1dir}  && rm -f $(MAN_PAGES))
+       (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
+           ext=.gz; else ext=; fi; \
+        cd ${mansrcdir} && for page in *.1; do \
+          rm -f $(DESTDIR)${man1dir}/$$page$$ext; done )
        (cd $(DESTDIR)${bindir}  && rm -f $(EMACSFULL) $(EMACS))
        (cd $(DESTDIR)${icondir} && rm -f hicolor/*x*/apps/emacs.png hicolor/*x*/apps/emacs22.png hicolor/scalable/apps/emacs.svg hicolor/scalable/mimetypes/emacs-document.svg )
        -rm -f $(DESTDIR)${desktopdir}/emacs.desktop
@@ -909,6 +897,7 @@ check-info-dir: info
          case $${file} in \
            *-[0-9]*|COPYING|dir) continue ;; \
          esac ; \
+         file=`echo $${file} | sed 's/\.info//'` ; \
          grep -q -F ": ($${file})." dir || missing="$${missing} $${file}" ; \
        done ; \
        if test -n "$${missing}"; then \
@@ -936,7 +925,7 @@ bootstrap: bootstrap-clean FRC
        if [ -x ./config.status ]; then           \
            ./config.status;                      \
        else                                      \
-           ./configure --enable-maintainer-mode; \
+           ./configure $(CONFIGURE_FLAGS);       \
        fi
        $(MAKE) $(MFLAGS) info all