Correct buggy dispatch logic.
[bpt/emacs.git] / Makefile.in
index 34beec6..8307c9d 100644 (file)
@@ -84,6 +84,7 @@ CPPFLAGS=@CPPFLAGS@
 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
 LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@
 EXEEXT=@EXEEXT@
+MAKEINFO=@MAKEINFO@
 
 ### These help us choose version- and architecture-specific directories
 ### to install files in.
@@ -262,8 +263,8 @@ EMACSFULL = `echo emacs-${version}${EXEEXT} | sed '$(TRANSFORM)'`
 # leim is not included because it needs special handling.
 SUBDIR = lib-src src
 
-# The makefiles of the directories in $SUBDIR.
-SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile
+# The subdir makefiles created by config.status.
+SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile
 
 # Subdirectories to install, and where they'll go.
 # lib-src's makefile knows how to install it, so we don't do that here.
@@ -370,6 +371,9 @@ lwlib/Makefile: $(srcdir)/lwlib/Makefile.in config.status
 leim/Makefile: $(srcdir)/leim/Makefile.in config.status
        ./config.status
 
+lisp/Makefile: $(srcdir)/lisp/Makefile.in config.status
+       ./config.status
+
 # ==================== Installation ====================
 
 ## If we let lib-src do its own installation, that means we
@@ -550,6 +554,7 @@ install-arch-indep: mkdir info install-etc
           fi; \
           cd ${srcdir}/info ; \
           for elt in $(INFO_FILES); do \
+             test "$(MAKEINFO)" = "no" && ! test -e $$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; \
                chmod a+r $(DESTDIR)${infodir}/$$f; \
@@ -561,6 +566,7 @@ install-arch-indep: mkdir info install-etc
        if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
        then \
          for elt in $(INFO_FILES); do \
+           test "$(MAKEINFO)" = "no" && ! test -e $$elt && continue; \
            (cd $${thisdir}; \
             ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
          done; \
@@ -767,15 +773,23 @@ dist:
        cd ${srcdir}; ./make-dist
 
 .PHONY: info dvi dist check html
+
+info-real: 
+       -(cd doc/emacs; $(MAKE) $(MFLAGS) info)
+       -(cd doc/misc; $(MAKE) $(MFLAGS) info)
+       -(cd doc/lispref; $(MAKE) $(MFLAGS) info)
+       -(cd doc/lispintro; $(MAKE) $(MFLAGS) info)
+
 force-info:
 # Note that man/Makefile knows how to
 # put the info files in $(srcdir),
 # so we can do ok running make in the build dir.
 info: force-info
-       -(cd doc/emacs; $(MAKE) $(MFLAGS) info)
-       -(cd doc/misc; $(MAKE) $(MFLAGS) info)
-       -(cd doc/lispref; $(MAKE) $(MFLAGS) info)
-       -(cd doc/lispintro; $(MAKE) $(MFLAGS) info)
+       @if test "$(MAKEINFO)" = "no"; then \
+         echo "Configured without makeinfo, not building manuals" ; \
+       else \
+         $(MAKE) $(MFLAGS) info-real ; \
+       fi
 
 # The info/dir file must be updated by hand when new manuals are added.
 check-info-dir: info