#### Makefile for the Emacs Manual
-# Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1996-2011 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# of the source tree. This is set by configure's `--srcdir' option.
srcdir=@srcdir@
-# Tell make where to find source files; this is needed for the makefiles.
-VPATH=@srcdir@
-
# Only for make dist.
version=@version@
## Note that the setfilename command in the .texi files assumes this.
## This is a bit funny. Because the info files are in the
## distribution tarfiles, they are always made in $scrdir/../../info,
-## even for out-of-tree builds. So infodir is really relative to srcdir.
-## The use of VPATH makes it work out, but why not set
-## infodir = $(srcdir)/../../info and make it explicit?
-infodir=../../info
+## even for out-of-tree builds.
+infodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
# The makeinfo program is part of the Texinfo distribution.
# Use --force so that it generates output even if there are errors.
-MAKEINFO = makeinfo --force
+MAKEINFO = @MAKEINFO@
+MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
+DVIPS = dvips
-# The following rule does not work with all versions of `make'.
-.SUFFIXES: .texi .dvi
-.texi.dvi:
- $(TEXI2DVI) $<
-ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
+ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
+ MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
EMACS_XTRA= \
## This seems pointless. The info/ directory exists in both the
## repository and the release tarfiles. We do not use any
-## equivalent of mkdir -p/mkinstalldirs, so this is not a general
+## equivalent of mkdir -p/install-sh -d, so this is not a general
## solution anyway. The second test -d is for parallel builds.
-mkinfodir = @cd ${srcdir}; test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
-.PHONY: info dvi pdf
+.PHONY: info dvi html pdf ps
info: $(infodir)/emacs
dvi: emacs.dvi
+html: emacs.html
pdf: emacs.pdf
+ps: emacs.ps
# Note that all the Info targets build the Info files in srcdir.
# There is no provision for Info files to exist in the build directory.
$(infodir)/emacs: ${EMACSSOURCES}
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $< -o $@
+ $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $<
emacs.dvi: ${EMACSSOURCES}
$(ENVADD) $(TEXI2DVI) $<
+emacs.ps: emacs.dvi
+ $(DVIPS) -o $@ $<
+
emacs.pdf: ${EMACSSOURCES}
$(ENVADD) $(TEXI2PDF) $<
+emacs.html: ${EMACSSOURCES}
+ $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $<
emacs-xtra.dvi: $(EMACS_XTRA)
$(ENVADD) $(TEXI2DVI) $<
+emacs-xtra.ps: emacs-xtra.dvi
+ $(DVIPS) -o $@ $<
+
emacs-xtra.pdf: $(EMACS_XTRA)
$(ENVADD) $(TEXI2PDF) $<
## Products not in the release tarfiles.
clean: mostlyclean
- rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf
+ rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf \
+ emacs.ps emacs-xtra.ps
+ rm -rf emacs.html/
rm -f emacs-manual-${version}.tar*
distclean: clean
## In the standalone tarfile, the clean rule runs this.
infoclean:
- -cd $(srcdir) && cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9]
+ -cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9]
maintainer-clean: distclean infoclean