Makefile.in 2.91 KB
Newer Older
Glenn Morris's avatar
Glenn Morris committed
1 2
#### Makefile for the Emacs Lisp Introduction manual

Glenn Morris's avatar
Glenn Morris committed
3
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
4 5
#   2004, 2005, 2006, 2007, 2008, 2009, 2010
#   Free Software Foundation, Inc.
Glenn Morris's avatar
Glenn Morris committed
6 7 8

# This file is part of GNU Emacs.

9
# GNU Emacs is free software: you can redistribute it and/or modify
Glenn Morris's avatar
Glenn Morris committed
10
# it under the terms of the GNU General Public License as published by
11 12
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
Glenn Morris's avatar
Glenn Morris committed
13 14 15 16 17 18 19

# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
20 21
# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

22
SHELL = /bin/sh
Glenn Morris's avatar
Glenn Morris committed
23 24

srcdir = @srcdir@
25
version=@version@
Glenn Morris's avatar
Glenn Morris committed
26

27
infodir = $(srcdir)/../../info
28 29
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
Glenn Morris's avatar
Glenn Morris committed
30

31
MAKEINFO = makeinfo --force -I $(srcdir)
Glenn Morris's avatar
Glenn Morris committed
32
TEXI2DVI = texi2dvi
Glenn Morris's avatar
Glenn Morris committed
33
TEXI2PDF = texi2pdf
Glenn Morris's avatar
Glenn Morris committed
34 35
DVIPS = dvips

36
mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
37

38
.PHONY: info dvi html pdf ps
Glenn Morris's avatar
Glenn Morris committed
39

40 41 42 43 44
info: ${infodir}/eintr

dvi: emacs-lisp-intro.dvi
html: emacs-lisp-intro.html
pdf: emacs-lisp-intro.pdf
45
ps: emacs-lisp-intro.ps
Glenn Morris's avatar
Glenn Morris committed
46

47 48
# The file name eintr must fit within 5 characters, to allow for
# -NN extensions to fit into DOS 8+3 limits without clashing.
49 50
${infodir}/eintr: ${srcdir}/emacs-lisp-intro.texi
	$(mkinfodir)
51
	$(MAKEINFO) -o $@ $<
Glenn Morris's avatar
Glenn Morris committed
52

53
emacs-lisp-intro.dvi: ${srcdir}/emacs-lisp-intro.texi
54
	$(TEXI2DVI) -I $(srcdir) -I $(texinfodir) $<
Glenn Morris's avatar
Glenn Morris committed
55

56 57 58
emacs-lisp-intro.ps: emacs-lisp-intro.dvi
	$(DVIPS) -o $@ $<

59
emacs-lisp-intro.pdf: ${srcdir}/emacs-lisp-intro.texi
60
	$(TEXI2PDF) -I $(srcdir) -I $(texinfodir) $<
Glenn Morris's avatar
Glenn Morris committed
61

62
emacs-lisp-intro.html: ${srcdir}/emacs-lisp-intro.texi
63
	$(MAKEINFO) --html -o $@ $<
Glenn Morris's avatar
Glenn Morris committed
64

65 66
.PHONY: mostlyclean clean distclean maintainer-clean infoclean

Glenn Morris's avatar
Glenn Morris committed
67
mostlyclean:
68 69
	rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
	  *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
Glenn Morris's avatar
Glenn Morris committed
70 71

clean: mostlyclean
72
	rm -f emacs-lisp-intro.dvi emacs-lisp-intro.pdf emacs-lisp-intro.ps
73
	rm -rf emacs-lisp-intro.html/
74
	rm -f emacs-lispintro-${version}.tar*
Glenn Morris's avatar
Glenn Morris committed
75 76 77

distclean: clean

78
infoclean:
79
	-cd $(infodir) && rm -f eintr eintr-[1-9]
80 81 82

maintainer-clean: distclean infoclean

Glenn Morris's avatar
Glenn Morris committed
83 84
.PHONY: dist

85
dist:
86 87
	rm -rf emacs-lispintro-${version}
	mkdir emacs-lispintro-${version}
88 89
	cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \
	  ${texinfodir}/texinfo.tex \
90
	  ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/
91 92
	sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
	  -e 's/^\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
93 94 95 96
	  -e "s/@ver[s]ion@/${version}/" \
	  ${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile
	tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version}
	rm -rf emacs-lispintro-${version}
Glenn Morris's avatar
Glenn Morris committed
97

98
### Makefile ends here