Makefile.in 2.84 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 32

MAKEINFO = makeinfo
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

Glenn Morris's avatar
Glenn Morris committed
38 39
.SUFFIXES: .dvi .ps .texi

Glenn Morris's avatar
Glenn Morris committed
40 41
.PHONY: info dvi html pdf

42 43 44 45 46
info: ${infodir}/eintr

dvi: emacs-lisp-intro.dvi
html: emacs-lisp-intro.html
pdf: emacs-lisp-intro.pdf
Glenn Morris's avatar
Glenn Morris committed
47

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

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

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

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

.dvi.ps:
	$(DVIPS) $< -o $@

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

Glenn Morris's avatar
Glenn Morris committed
68
mostlyclean:
69 70
	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
71 72

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

distclean: clean

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

maintainer-clean: distclean infoclean

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

86
dist:
87 88
	rm -rf emacs-lispintro-${version}
	mkdir emacs-lispintro-${version}
89 90
	cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \
	  ${texinfodir}/texinfo.tex \
91
	  ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/
92 93
	sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
	  -e 's/^\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
94 95 96 97
	  -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
98

99
### Makefile ends here