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

3
# Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc.
Glenn Morris's avatar
Glenn Morris committed
4 5 6

# This file is part of GNU Emacs.

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

# 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
18 19
# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

20
SHELL = /bin/sh
Glenn Morris's avatar
Glenn Morris committed
21 22

srcdir = @srcdir@
23
version=@version@
Glenn Morris's avatar
Glenn Morris committed
24

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

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

35 36 37
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
         MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"

38
mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
39

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

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

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

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

56
emacs-lisp-intro.dvi: ${srcdir}/emacs-lisp-intro.texi
57
	$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
58

59
emacs-lisp-intro.ps: emacs-lisp-intro.dvi
60
	$(DVIPS) -o $@ emacs-lisp-intro.dvi
61

62
emacs-lisp-intro.pdf: ${srcdir}/emacs-lisp-intro.texi
63
	$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
64

65
emacs-lisp-intro.html: ${srcdir}/emacs-lisp-intro.texi
66
	$(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
67

68 69
.PHONY: mostlyclean clean distclean maintainer-clean infoclean

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

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

distclean: clean

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

maintainer-clean: distclean infoclean

Glenn Morris's avatar
Glenn Morris committed
86 87
.PHONY: dist

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

101
### Makefile ends here