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