doc: convert some TeX accents to UTF-8
[bpt/emacs.git] / Makefile.in
index a2de4f3..b112c6a 100644 (file)
@@ -54,6 +54,9 @@
 # make bootstrap
 #      Removes all the compiled files to force a new bootstrap from a
 #      clean slate, and then build in the normal way.
+#
+# make docs
+#      Make Emacs documentation files from their sources; requires makeinfo.
 
 SHELL = /bin/sh
 
@@ -621,6 +624,12 @@ install-info: info
              ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
           done)
 
+## "gzip || true" is because some gzips exit with non-zero status
+## if compression would not reduce the file size.  Eg, the gzip in
+## OpenBSD 4.9 seems to do this (2013/03).  In Emacs, this can
+## only happen with the tiny ctags.1 manpage.  We don't really care if
+## ctags.1 is compressed or not.  "gzip -f" is another option here,
+## but not sure if portable.
 install-man:
        umask 022; ${MKDIR_P} $(DESTDIR)${man1dir}
        thisdir=`/bin/pwd`; \
@@ -631,7 +640,7 @@ install-man:
           ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
          ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
          rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
-         ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest}; \
+         ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \
        done
 
 ## Install those items from etc/ that need to end up elsewhere.
@@ -859,13 +868,25 @@ check:
 dist:
        cd ${srcdir}; ./make-dist
 
+DVIS  = lispref-dvi  lispintro-dvi  emacs-dvi  misc-dvi
+HTMLS = lispref-html lispintro-html emacs-html misc-html
+INFOS = lispref-info lispintro-info emacs-info misc-info
+PDFS  = lispref-pdf  lispintro-pdf  emacs-pdf  misc-pdf
+PSS   = lispref-ps   lispintro-ps   emacs-ps # no misc-ps
+
+DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS)
+$(DOCS):
+       t=$@; IFS=-; set $$t; IFS=; cd doc/$$1 && $(MAKE) $(MFLAGS) $$2
+
+.PHONY: $(DOCS) docs pdf ps
 .PHONY: info dvi dist check html info-real force-info check-info-dir
 
-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)
+docs: $(DOCS)
+dvi: $(DVIS)
+html: $(HTMLS)
+info-real: $(INFOS)
+pdf: $(PDFS)
+ps: $(PSS)
 
 force-info:
 # Note that man/Makefile knows how to put the info files in $(srcdir),
@@ -904,12 +925,6 @@ check-info-dir: info
        fi ; \
        echo "info/dir is OK"
 
-dvi:
-       (cd doc/emacs; $(MAKE) $(MFLAGS) dvi)
-       (cd doc/misc; $(MAKE) $(MFLAGS) dvi)
-       (cd doc/lispref; $(MAKE) $(MFLAGS) elisp.dvi)
-       (cd doc/lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
-
 #### Bootstrapping.
 
 ### This first cleans the lisp subdirectory, removing all compiled