# 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 --force -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)"
$(srcdir)/msdog-xtra.texi
EMACSSOURCES= \
- ${srcdir}/emacsver.texi \
${srcdir}/emacs.texi \
+ ${srcdir}/emacsver.texi \
${srcdir}/doclicense.texi \
${srcdir}/gpl.texi \
${srcdir}/screen.texi \
## repository and the release tarfiles. We do not use any
## equivalent of mkdir -p/mkinstalldirs, 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) emacs.texi -o $@
+ $(MAKEINFO) -o $@ $<
emacs.dvi: ${EMACSSOURCES}
- $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
+ $(ENVADD) $(TEXI2DVI) $<
+
+emacs.ps: emacs.dvi
+ $(DVIPS) -o $@ $<
emacs.pdf: ${EMACSSOURCES}
- $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
+ $(ENVADD) $(TEXI2PDF) $<
+emacs.html: ${EMACSSOURCES}
+ $(MAKEINFO) --html -o $@ $<
emacs-xtra.dvi: $(EMACS_XTRA)
- $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
+ $(ENVADD) $(TEXI2DVI) $<
+
+emacs-xtra.ps: emacs-xtra.dvi
+ $(DVIPS) -o $@ $<
emacs-xtra.pdf: $(EMACS_XTRA)
- $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
+ $(ENVADD) $(TEXI2PDF) $<
.PHONY: mostlyclean clean distclean maintainer-clean infoclean
## 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
mkdir emacs-manual-${version}
cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
${srcdir}/ChangeLog* emacs-manual-${version}/
- sed -e 's/@sr[c]dir@/./' -e 's/\(texinfodir *=\).*/\1 ./' \
- -e 's/\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
+ sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
+ -e 's/^\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
-e "s/@ver[s]ion@/${version}/" \
${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
- sed -e "s/@ver[s]ion@/${version}/" \
- ${srcdir}/emacsver.texi.in > emacs-manual-${version}/emacsver.texi
tar -cf emacs-manual-${version}.tar emacs-manual-${version}
rm -rf emacs-manual-${version}