Makefile.in 4.4 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
  $(srcdir)/abbrevs.texi \
  $(srcdir)/advice.texi \
  $(srcdir)/anti.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 \
81
  $(srcdir)/package.texi \
Glenn Morris's avatar
Glenn Morris committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
  $(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

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

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

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

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

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

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

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

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

125 126 127 128 129 130 131
.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
132

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

distclean: clean

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

143 144
maintainer-clean: distclean infoclean

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

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

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