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