Makefile.in 4.42 KB
Newer Older
Glenn Morris's avatar
Glenn Morris committed
1 2
# Makefile for the GNU Emacs Lisp Reference Manual.

Glenn Morris's avatar
Glenn Morris committed
3
# Copyright (C) 1990-1996, 1998-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 23 24

# Standard configure variables.
srcdir = @srcdir@

25 26
version=@version@

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

33
MAKEINFO = @MAKEINFO@
34
MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir)
Glenn Morris's avatar
Glenn Morris committed
35
TEXI2DVI = texi2dvi
Glenn Morris's avatar
Glenn Morris committed
36
TEXI2PDF = texi2pdf
37
DVIPS = dvips
Glenn Morris's avatar
Glenn Morris committed
38

39
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
40 41
         MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"

Glenn Morris's avatar
Glenn Morris committed
42 43 44
# List of all the texinfo files in the manual:

srcs = \
45
  $(srcdir)/elisp.texi \
46
  $(emacsdir)/emacsver.texi \
Glenn Morris's avatar
Glenn Morris committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
  $(srcdir)/abbrevs.texi \
  $(srcdir)/advice.texi \
  $(srcdir)/anti.texi \
  $(srcdir)/back.texi \
  $(srcdir)/backups.texi \
  $(srcdir)/buffers.texi \
  $(srcdir)/commands.texi \
  $(srcdir)/compile.texi \
  $(srcdir)/control.texi \
  $(srcdir)/customize.texi \
  $(srcdir)/debugging.texi \
  $(srcdir)/display.texi \
  $(srcdir)/edebug.texi \
  $(srcdir)/errors.texi \
  $(srcdir)/eval.texi \
  $(srcdir)/files.texi \
  $(srcdir)/frames.texi \
  $(srcdir)/functions.texi \
  $(srcdir)/hash.texi \
  $(srcdir)/help.texi \
  $(srcdir)/hooks.texi \
  $(srcdir)/internals.texi \
  $(srcdir)/intro.texi \
  $(srcdir)/keymaps.texi \
  $(srcdir)/lists.texi \
  $(srcdir)/loading.texi \
  $(srcdir)/macros.texi \
  $(srcdir)/maps.texi \
  $(srcdir)/markers.texi \
  $(srcdir)/minibuf.texi \
  $(srcdir)/modes.texi \
  $(srcdir)/nonascii.texi \
  $(srcdir)/numbers.texi \
  $(srcdir)/objects.texi \
  $(srcdir)/os.texi \
82
  $(srcdir)/package.texi \
Glenn Morris's avatar
Glenn Morris committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
  $(srcdir)/positions.texi \
  $(srcdir)/processes.texi \
  $(srcdir)/searching.texi \
  $(srcdir)/sequences.texi \
  $(srcdir)/streams.texi \
  $(srcdir)/strings.texi \
  $(srcdir)/symbols.texi \
  $(srcdir)/syntax.texi \
  $(srcdir)/text.texi \
  $(srcdir)/tips.texi \
  $(srcdir)/variables.texi \
  $(srcdir)/windows.texi \
  $(srcdir)/index.texi \
  $(srcdir)/gpl.texi \
  $(srcdir)/doclicense.texi

99
mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
100

101
.PHONY: info dvi pdf ps
Glenn Morris's avatar
Glenn Morris committed
102

Glenn Morris's avatar
Glenn Morris committed
103
info: $(infodir)/elisp
Glenn Morris's avatar
Glenn Morris committed
104
dvi: elisp.dvi
105
html: elisp.html
Glenn Morris's avatar
Glenn Morris committed
106
pdf: elisp.pdf
107
ps: elisp.ps
Glenn Morris's avatar
Glenn Morris committed
108

109
## Note: "<" is not portable in ordinary make rules.
110 111
$(infodir)/elisp: $(srcs)
	$(mkinfodir)
112
	$(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $(srcdir)/elisp.texi
Glenn Morris's avatar
Glenn Morris committed
113 114

elisp.dvi: $(srcs)
115
	$(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
Glenn Morris's avatar
Glenn Morris committed
116

117
elisp.html: $(srcs)
118
	$(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $(srcdir)/elisp.texi
119

120
elisp.ps: elisp.dvi
121
	$(DVIPS) -o $@ elisp.dvi
122

Glenn Morris's avatar
Glenn Morris committed
123
elisp.pdf: $(srcs)
124
	$(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi
Glenn Morris's avatar
Glenn Morris committed
125

126 127 128 129 130 131 132
.PHONY: mostlyclean clean distclean maintainer-clean infoclean

## [12] stuff is from two-volume.make.
mostlyclean:
	rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
	  *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
	rm -f elisp[12]*
Glenn Morris's avatar
Glenn Morris committed
133

134
clean: mostlyclean
135
	rm -f elisp.dvi elisp.pdf elisp.ps vol[12].pdf
136
	rm -rf elisp.html
137
	rm -f emacs-lispref-${version}.tar*
Glenn Morris's avatar
Glenn Morris committed
138 139 140

distclean: clean

141
infoclean:
142
	-cd $(infodir) && rm -f elisp elisp-[1-9] elisp-[1-9][0-9]
Glenn Morris's avatar
Glenn Morris committed
143

144 145
maintainer-clean: distclean infoclean

Glenn Morris's avatar
Glenn Morris committed
146 147
.PHONY: dist

148 149
## Note this excludes the two-volume stuff.
dist:
150 151
	rm -rf emacs-lispref-${version}
	mkdir emacs-lispref-${version}
152
	cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
153 154
	  $(emacsdir)/emacsver.texi ${srcdir}/ChangeLog* \
	  ${srcdir}/README emacs-lispref-${version}/
155 156 157
	sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
	  -e 's/^\(emacsdir *=\).*/\1 ./' \
	  -e 's/^\(infodir *=\).*/\1 ./' -e 's/^\(clean:.*\)/\1 infoclean/' \
158 159 160 161
	  -e "s/@ver[s]ion@/${version}/" \
	  ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile
	tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
	rm -rf emacs-lispref-${version}
162

Glenn Morris's avatar
Glenn Morris committed
163
### Makefile ends here