]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/Makefile.in
Add doc/ dependencies on emacsver.texi.
[gnu-emacs] / doc / lispref / Makefile.in
index 54fc32f217a2c55ca3ca563812f2d0114cc671ee..4336a25d5ee60d851f312dd9338dcde3479c3321 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile for the GNU Emacs Lisp Reference Manual.
 
 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
-#   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
@@ -19,6 +19,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
+SHELL = /bin/sh
 
 # Standard configure variables.
 srcdir = @srcdir@
@@ -26,22 +27,22 @@ srcdir = @srcdir@
 # Tell make where to find source files; this is needed for the makefiles.
 VPATH=@srcdir@
 
+version=@version@
+
 infodir = ../../info
-usermanualdir = $(srcdir)/../emacs
-miscmanualdir = $(srcdir)/../misc
+# Directory with the (customized) texinfo.tex file.
+texinfodir = $(srcdir)/../misc
+# Directory with emacsver.texi.
+emacsdir =  $(srcdir)/../emacs
 
+MAKEINFO = makeinfo --force -I $(emacsdir)
 TEXI2DVI = texi2dvi
-SHELL = /bin/sh
-INSTALL_INFO = install-info
-MAKEINFO = makeinfo --force
-
-# The name of the manual:
-VERSION=2.9
-manual = elisp-manual-21-$(VERSION)
+TEXI2PDF = texi2pdf
 
 # List of all the texinfo files in the manual:
 
 srcs = \
+  $(emacsdir)/emacsver.texi \
   $(srcdir)/abbrevs.texi \
   $(srcdir)/advice.texi \
   $(srcdir)/anti.texi \
@@ -95,51 +96,59 @@ srcs = \
   $(srcdir)/gpl.texi \
   $(srcdir)/doclicense.texi
 
-
-.PHONY: clean
+.PHONY: info dvi pdf
 
 # The info file is named `elisp'.
 info: $(infodir)/elisp
+dvi: elisp.dvi
+pdf: elisp.pdf
+
+$(infodir):
+       mkdir $@ || test -d $@
 
-$(infodir)/elisp: $(srcs)
-       cd $(srcdir); $(MAKEINFO) -I. -I$(infodir) elisp.texi -o $(infodir)/elisp
+$(infodir)/elisp: $(infodir) $(srcs)
+       cd $(srcdir); $(MAKEINFO) -I. -I$(texinfodir) elisp.texi -o $@
 
 elisp.dvi: $(srcs)
-       $(TEXI2DVI) -I $(srcdir) -I $(usermanualdir) $(srcdir)/elisp.texi
+       $(TEXI2DVI) -I $(srcdir) -I $(texinfodir) $(srcdir)/elisp.texi
+
+elisp.pdf: $(srcs)
+       $(TEXI2PDF) -I $(srcdir) -I $(texinfodir) $(srcdir)/elisp.texi
 
-# This is for use in a separate distro of the Emacs Lisp manual.
-install: elisp
-       $(srcdir)/mkinstalldirs $(infodir)
-       cp elisp elisp-[1-9] elisp-[1-9][0-9] $(infodir)
-       ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/elisp
+.PHONY: mostlyclean clean distclean maintainer-clean infoclean
 
-# This is for use in a separate distro of the Emacs Lisp manual.
-elisp: $(srcs)
-       $(MAKEINFO) -I. -I$(srcdir) $(srcdir)/elisp.texi
+## [12] stuff is from two-volume.make.
+mostlyclean:
+       rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
+         *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
+       rm -f elisp[12]*
 
-clean:
-       rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
-              *.vr *.vrs *.pg *.pgs *.ky *.kys
-       rm -f make.out core
+clean: mostlyclean
+       rm -f elisp.dvi elisp.pdf vol[12].pdf
+       rm -f emacs-lispref-${version}.tar*
 
 distclean: clean
 
-maintainer-clean: clean
-       rm -f elisp.dvi elisp.oaux
-       cd $(infodir); rm -f elisp elisp-[1-9] elisp-[1-9][0-9]
-
-dist: $(infodir)/elisp elisp.dvi
-       -rm -rf temp
-       -mkdir temp
-       -mkdir temp/$(manual)
-       -ln $(srcdir)/README $(srcdir)/configure.in $(srcdir)/configure \
- $(srcdir)/Makefile.in $(srcs) \
- $(miscmanualdir)/texinfo.tex \
- elisp.dvi elisp.aux elisp.??s \
- $(infodir)/elisp $(infodir)/elisp-[1-9] $(infodir)/elisp-[1-9][0-9] \
- temp/$(manual)
-       -(cd temp/$(manual); rm -f mkinstalldirs)
-       cp $(srcdir)/mkinstalldirs temp/$(manual)
-       (cd temp/$(manual); rm -f *~)
-       (cd temp; tar chf - $(manual)) | gzip > $(manual).tar.gz
-       -rm -rf temp
+infoclean:
+       -cd $(infodir) && rm -f elisp elisp-[1-9] elisp-[1-9][0-9]
+
+maintainer-clean: distclean infoclean
+
+.PHONY: dist
+
+## Note this excludes the two-volume stuff.
+dist:
+       rm -rf emacs-lispref-${version}
+       mkdir emacs-lispref-${version}
+       cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
+         ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispref-${version}/
+       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-lispref-${version}/Makefile
+       sed -e "s/@ver[s]ion@/${version}/" \
+         ${emacsdir}/emacsver.texi.in > emacs-lispref-${version}/emacsver.texi
+       tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
+       rm -rf emacs-lispref-${version}
+
+### Makefile ends here