Commit | Line | Data |
---|---|---|
8cda6f8f GM |
1 | #### Makefile for the Emacs Lisp Introduction manual |
2 | ||
ab422c4d | 3 | # Copyright (C) 1994-1999, 2001-2013 Free Software Foundation, Inc. |
8cda6f8f GM |
4 | |
5 | # This file is part of GNU Emacs. | |
6 | ||
8ae3715e | 7 | # GNU Emacs is free software: you can redistribute it and/or modify |
8cda6f8f | 8 | # it under the terms of the GNU General Public License as published by |
8ae3715e GM |
9 | # the Free Software Foundation, either version 3 of the License, or |
10 | # (at your option) any later version. | |
8cda6f8f GM |
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 | |
8ae3715e GM |
18 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
19 | ||
4c83f6e1 | 20 | SHELL = /bin/sh |
8cda6f8f GM |
21 | |
22 | srcdir = @srcdir@ | |
17ca7950 | 23 | version=@version@ |
8cda6f8f | 24 | |
2fecccba | 25 | buildinfodir = $(srcdir)/../../info |
fdf93ad9 GM |
26 | # Directory with the (customized) texinfo.tex file. |
27 | texinfodir = $(srcdir)/../misc | |
8cda6f8f | 28 | |
3fe7cdc8 GM |
29 | MKDIR_P = @MKDIR_P@ |
30 | ||
8045b906 GM |
31 | INFO_EXT=@INFO_EXT@ |
32 | # Options used only when making info output. | |
33 | INFO_OPTS=@INFO_OPTS@ | |
34 | ||
53ed5e45 WL |
35 | MAKEINFO = @MAKEINFO@ |
36 | MAKEINFO_OPTS = --force -I $(srcdir) | |
8cda6f8f | 37 | TEXI2DVI = texi2dvi |
b60bfecc | 38 | TEXI2PDF = texi2pdf |
8cda6f8f GM |
39 | DVIPS = dvips |
40 | ||
53ed5e45 WL |
41 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \ |
42 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" | |
43 | ||
ac1a0ce1 | 44 | mkinfodir = @${MKDIR_P} ${buildinfodir} |
abd40fb4 | 45 | |
19e9f435 GM |
46 | srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi |
47 | ||
c12e4a81 | 48 | .PHONY: info dvi html pdf ps |
ea274122 | 49 | |
ac1a0ce1 | 50 | info: ${buildinfodir}/eintr$(INFO_EXT) |
4c83f6e1 | 51 | |
4c83f6e1 GM |
52 | dvi: emacs-lisp-intro.dvi |
53 | html: emacs-lisp-intro.html | |
54 | pdf: emacs-lisp-intro.pdf | |
c12e4a81 | 55 | ps: emacs-lisp-intro.ps |
8cda6f8f | 56 | |
4c83f6e1 GM |
57 | # The file name eintr must fit within 5 characters, to allow for |
58 | # -NN extensions to fit into DOS 8+3 limits without clashing. | |
f48a9cb4 | 59 | # Note: "<" is not portable in ordinary make rules. |
19e9f435 | 60 | ${buildinfodir}/eintr$(INFO_EXT): ${srcs} |
abd40fb4 | 61 | $(mkinfodir) |
8045b906 | 62 | $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi |
8cda6f8f | 63 | |
19e9f435 | 64 | emacs-lisp-intro.dvi: ${srcs} |
f48a9cb4 | 65 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi |
8cda6f8f | 66 | |
c12e4a81 | 67 | emacs-lisp-intro.ps: emacs-lisp-intro.dvi |
f48a9cb4 | 68 | $(DVIPS) -o $@ emacs-lisp-intro.dvi |
c12e4a81 | 69 | |
19e9f435 | 70 | emacs-lisp-intro.pdf: ${srcs} |
f48a9cb4 | 71 | $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi |
b60bfecc | 72 | |
19e9f435 | 73 | emacs-lisp-intro.html: ${srcs} |
f48a9cb4 | 74 | $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs-lisp-intro.texi |
8cda6f8f | 75 | |
4c83f6e1 GM |
76 | .PHONY: mostlyclean clean distclean maintainer-clean infoclean |
77 | ||
8cda6f8f | 78 | mostlyclean: |
4c83f6e1 GM |
79 | rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ |
80 | *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs | |
8cda6f8f GM |
81 | |
82 | clean: mostlyclean | |
c12e4a81 | 83 | rm -f emacs-lisp-intro.dvi emacs-lisp-intro.pdf emacs-lisp-intro.ps |
4c83f6e1 | 84 | rm -rf emacs-lisp-intro.html/ |
17ca7950 | 85 | rm -f emacs-lispintro-${version}.tar* |
8cda6f8f GM |
86 | |
87 | distclean: clean | |
88 | ||
4c83f6e1 | 89 | infoclean: |
ac1a0ce1 | 90 | -cd $(buildinfodir) && rm -f eintr$(INFO_EXT) eintr$(INFO_EXT)-[1-9] |
4c83f6e1 GM |
91 | |
92 | maintainer-clean: distclean infoclean | |
93 | ||
ea274122 GM |
94 | .PHONY: dist |
95 | ||
4c83f6e1 | 96 | dist: |
17ca7950 GM |
97 | rm -rf emacs-lispintro-${version} |
98 | mkdir emacs-lispintro-${version} | |
4c83f6e1 GM |
99 | cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \ |
100 | ${texinfodir}/texinfo.tex \ | |
17ca7950 | 101 | ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/ |
4393405b | 102 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ |
2fecccba GM |
103 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ |
104 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | |
17ca7950 GM |
105 | -e "s/@ver[s]ion@/${version}/" \ |
106 | ${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile | |
107 | tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version} | |
108 | rm -rf emacs-lispintro-${version} | |
8cda6f8f | 109 | |
4c83f6e1 | 110 | ### Makefile ends here |