Merge from emacs-24; up to 2012-12-27T20:09:45Z!juri@jurta.org
[bpt/emacs.git] / doc / lispintro / Makefile.in
1 #### Makefile for the Emacs Lisp Introduction manual
2
3 # Copyright (C) 1994-1999, 2001-2013 Free Software Foundation, Inc.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20 SHELL = /bin/sh
21
22 srcdir = @srcdir@
23 version=@version@
24
25 buildinfodir = $(srcdir)/../../info
26 # Directory with the (customized) texinfo.tex file.
27 texinfodir = $(srcdir)/../misc
28 # Directory with emacsver.texi.
29 emacsdir = $(srcdir)/../emacs
30
31 MKDIR_P = @MKDIR_P@
32
33 INFO_EXT=@INFO_EXT@
34 # Options used only when making info output.
35 INFO_OPTS=@INFO_OPTS@
36
37 MAKEINFO = @MAKEINFO@
38 MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir)
39 TEXI2DVI = texi2dvi
40 TEXI2PDF = texi2pdf
41 DVIPS = dvips
42
43 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
44 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
45
46 mkinfodir = @${MKDIR_P} ${buildinfodir}
47
48 srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \
49 ${emacsdir}/emacsver.texi
50
51 .PHONY: info dvi html pdf ps
52
53 info: ${buildinfodir}/eintr$(INFO_EXT)
54
55 dvi: emacs-lisp-intro.dvi
56 html: emacs-lisp-intro.html
57 pdf: emacs-lisp-intro.pdf
58 ps: emacs-lisp-intro.ps
59
60 # The file name eintr must fit within 5 characters, to allow for
61 # -NN extensions to fit into DOS 8+3 limits without clashing.
62 # Note: "<" is not portable in ordinary make rules.
63 ${buildinfodir}/eintr$(INFO_EXT): ${srcs}
64 $(mkinfodir)
65 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
66
67 emacs-lisp-intro.dvi: ${srcs}
68 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
69
70 emacs-lisp-intro.ps: emacs-lisp-intro.dvi
71 $(DVIPS) -o $@ emacs-lisp-intro.dvi
72
73 emacs-lisp-intro.pdf: ${srcs}
74 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
75
76 emacs-lisp-intro.html: ${srcs}
77 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs-lisp-intro.texi
78
79 .PHONY: mostlyclean clean distclean maintainer-clean infoclean
80
81 mostlyclean:
82 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
83 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
84
85 clean: mostlyclean
86 rm -f emacs-lisp-intro.dvi emacs-lisp-intro.pdf emacs-lisp-intro.ps
87 rm -rf emacs-lisp-intro.html/
88 rm -f emacs-lispintro-${version}.tar*
89
90 distclean: clean
91
92 infoclean:
93 -cd $(buildinfodir) && rm -f eintr$(INFO_EXT) eintr$(INFO_EXT)-[1-9]
94
95 maintainer-clean: distclean infoclean
96
97 .PHONY: dist
98
99 dist:
100 rm -rf emacs-lispintro-${version}
101 mkdir emacs-lispintro-${version}
102 cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \
103 ${texinfodir}/texinfo.tex ${emacsdir}/emacsver.texi \
104 ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/
105 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
106 -e 's/^\(emacsdir *=\).*/\1 ./' \
107 -e 's/^\(buildinfodir *=\).*/\1 ./' \
108 -e 's/^\(clean:.*\)/\1 infoclean/' \
109 -e "s/@ver[s]ion@/${version}/" \
110 ${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile
111 tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version}
112 rm -rf emacs-lispintro-${version}
113
114 ### Makefile ends here