Be consistent about reporting infoclean failures.
[bpt/emacs.git] / doc / lispintro / Makefile.in
CommitLineData
bbece175 1### @configure_input@
8cda6f8f 2
ba318903 3# Copyright (C) 1994-1999, 2001-2014 Free Software Foundation, Inc.
8cda6f8f
GM
4
5# This file is part of GNU Emacs.
6
8ae3715e 7# GNU Emacs is free software: you can redistribute it and/or modify
8cda6f8f 8# it under the terms of the GNU General Public License as published by
8ae3715e
GM
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
8cda6f8f
GM
11
12# GNU Emacs is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
8ae3715e
GM
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
50b13cde 20SHELL = @SHELL@
8cda6f8f 21
789cf833
GM
22# NB If you add any more configure variables,
23# update the sed rules in the dist target below.
8cda6f8f 24srcdir = @srcdir@
17ca7950 25version=@version@
8cda6f8f 26
2fecccba 27buildinfodir = $(srcdir)/../../info
fdf93ad9
GM
28# Directory with the (customized) texinfo.tex file.
29texinfodir = $(srcdir)/../misc
09b98a01
GM
30# Directory with emacsver.texi.
31emacsdir = $(srcdir)/../emacs
8cda6f8f 32
8496d8d7
GM
33prefix = @prefix@
34datarootdir = @datarootdir@
35datadir = @datadir@
36PACKAGE_TARNAME = @PACKAGE_TARNAME@
37docdir = @docdir@
38dvidir = @dvidir@
39htmldir = @htmldir@
40pdfdir = @pdfdir@
41psdir = @psdir@
42
3fe7cdc8
GM
43MKDIR_P = @MKDIR_P@
44
8496d8d7
GM
45GZIP_PROG = @GZIP_PROG@
46
47HTML_OPTS = --no-split --html
48
8045b906
GM
49INFO_EXT=@INFO_EXT@
50# Options used only when making info output.
51INFO_OPTS=@INFO_OPTS@
52
8496d8d7
GM
53INSTALL = @INSTALL@
54INSTALL_DATA = @INSTALL_DATA@
55
53ed5e45 56MAKEINFO = @MAKEINFO@
09b98a01 57MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir)
8cda6f8f 58TEXI2DVI = texi2dvi
b60bfecc 59TEXI2PDF = texi2pdf
8cda6f8f
GM
60DVIPS = dvips
61
09b98a01 62ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
53ed5e45
WL
63 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
64
8496d8d7
GM
65DVI_TARGETS = emacs-lisp-intro.dvi
66HTML_TARGETS = emacs-lisp-intro.html
67PDF_TARGETS = emacs-lisp-intro.pdf
68PS_TARGETS = emacs-lisp-intro.ps
69
ac1a0ce1 70mkinfodir = @${MKDIR_P} ${buildinfodir}
abd40fb4 71
09b98a01
GM
72srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \
73 ${emacsdir}/emacsver.texi
19e9f435 74
c12e4a81 75.PHONY: info dvi html pdf ps
ea274122 76
8496d8d7
GM
77.SUFFIXES: .ps .dvi
78
79.dvi.ps:
80 $(DVIPS) -o $@ $<
81
ac1a0ce1 82info: ${buildinfodir}/eintr$(INFO_EXT)
4c83f6e1 83
8496d8d7
GM
84dvi: $(DVI_TARGETS)
85html: $(HTML_TARGETS)
86pdf: $(PDF_TARGETS)
87ps: $(PS_TARGETS)
8cda6f8f 88
4c83f6e1
GM
89# The file name eintr must fit within 5 characters, to allow for
90# -NN extensions to fit into DOS 8+3 limits without clashing.
f48a9cb4 91# Note: "<" is not portable in ordinary make rules.
19e9f435 92${buildinfodir}/eintr$(INFO_EXT): ${srcs}
abd40fb4 93 $(mkinfodir)
8045b906 94 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
8cda6f8f 95
19e9f435 96emacs-lisp-intro.dvi: ${srcs}
f48a9cb4 97 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
8cda6f8f 98
19e9f435 99emacs-lisp-intro.pdf: ${srcs}
f48a9cb4 100 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
b60bfecc 101
19e9f435 102emacs-lisp-intro.html: ${srcs}
8496d8d7 103 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
8cda6f8f 104
4c83f6e1
GM
105.PHONY: mostlyclean clean distclean maintainer-clean infoclean
106
8cda6f8f 107mostlyclean:
4c83f6e1
GM
108 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
109 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
8cda6f8f
GM
110
111clean: mostlyclean
8496d8d7 112 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
17ca7950 113 rm -f emacs-lispintro-${version}.tar*
8cda6f8f
GM
114
115distclean: clean
26e4aa7d 116 rm -f Makefile
8cda6f8f 117
4c83f6e1 118infoclean:
eb36672f
PE
119 rm -f \
120 $(buildinfodir)/eintr$(INFO_EXT) \
121 $(buildinfodir)/eintr$(INFO_EXT)-[1-9]
4c83f6e1
GM
122
123maintainer-clean: distclean infoclean
124
ea274122
GM
125.PHONY: dist
126
4c83f6e1 127dist:
17ca7950
GM
128 rm -rf emacs-lispintro-${version}
129 mkdir emacs-lispintro-${version}
4c83f6e1 130 cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \
09b98a01 131 ${texinfodir}/texinfo.tex ${emacsdir}/emacsver.texi \
17ca7950 132 ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/
4393405b 133 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
09b98a01 134 -e 's/^\(emacsdir *=\).*/\1 ./' \
2fecccba
GM
135 -e 's/^\(buildinfodir *=\).*/\1 ./' \
136 -e 's/^\(clean:.*\)/\1 infoclean/' \
17ca7950 137 -e "s/@ver[s]ion@/${version}/" \
789cf833
GM
138 -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
139 -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
17ca7950 140 ${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile
fc4893eb
GM
141 @if grep '@[a-zA-Z_]*@' emacs-lispintro-${version}/Makefile; then \
142 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
143 fi
17ca7950
GM
144 tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version}
145 rm -rf emacs-lispintro-${version}
8cda6f8f 146
8496d8d7
GM
147
148.PHONY: install-dvi install-html install-pdf install-ps install-doc
149
150install-dvi: dvi
48f73cfb
GM
151 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
152 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
8496d8d7 153install-html: html
48f73cfb
GM
154 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
155 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
8496d8d7 156install-pdf: pdf
48f73cfb
GM
157 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
158 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
8496d8d7 159install-ps: ps
48f73cfb 160 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
8496d8d7 161 for file in $(PS_TARGETS); do \
48f73cfb 162 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
8496d8d7 163 [ -n "${GZIP_PROG}" ] || continue; \
48f73cfb
GM
164 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
165 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
8496d8d7
GM
166 done
167
168## Top-level Makefile installs the info pages.
169install-doc: install-dvi install-html install-pdf install-ps
170
171
172.PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
173
174uninstall-dvi:
175 for file in $(DVI_TARGETS); do \
48f73cfb 176 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
8496d8d7
GM
177 done
178uninstall-html:
179 for file in $(HTML_TARGETS); do \
48f73cfb 180 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
8496d8d7
GM
181 done
182uninstall-ps:
183 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
184 for file in $(PS_TARGETS); do \
48f73cfb 185 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
8496d8d7
GM
186 done
187uninstall-pdf:
188 for file in $(PDF_TARGETS); do \
48f73cfb 189 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
8496d8d7
GM
190 done
191
192uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
193
194
4c83f6e1 195### Makefile ends here