Commit | Line | Data |
---|---|---|
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 | 20 | SHELL = @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 | 24 | srcdir = @srcdir@ |
17ca7950 | 25 | version=@version@ |
8cda6f8f | 26 | |
2fecccba | 27 | buildinfodir = $(srcdir)/../../info |
fdf93ad9 GM |
28 | # Directory with the (customized) texinfo.tex file. |
29 | texinfodir = $(srcdir)/../misc | |
09b98a01 GM |
30 | # Directory with emacsver.texi. |
31 | emacsdir = $(srcdir)/../emacs | |
8cda6f8f | 32 | |
8496d8d7 GM |
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 | ||
3fe7cdc8 GM |
43 | MKDIR_P = @MKDIR_P@ |
44 | ||
8496d8d7 GM |
45 | GZIP_PROG = @GZIP_PROG@ |
46 | ||
47 | HTML_OPTS = --no-split --html | |
48 | ||
8045b906 | 49 | # Options used only when making info output. |
40abffe4 | 50 | INFO_OPTS= --no-split |
8045b906 | 51 | |
8496d8d7 GM |
52 | INSTALL = @INSTALL@ |
53 | INSTALL_DATA = @INSTALL_DATA@ | |
54 | ||
53ed5e45 | 55 | MAKEINFO = @MAKEINFO@ |
09b98a01 | 56 | MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir) |
8cda6f8f | 57 | TEXI2DVI = texi2dvi |
b60bfecc | 58 | TEXI2PDF = texi2pdf |
8cda6f8f GM |
59 | DVIPS = dvips |
60 | ||
09b98a01 | 61 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \ |
53ed5e45 WL |
62 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" |
63 | ||
8496d8d7 GM |
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 | ||
ac1a0ce1 | 69 | mkinfodir = @${MKDIR_P} ${buildinfodir} |
abd40fb4 | 70 | |
09b98a01 GM |
71 | srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \ |
72 | ${emacsdir}/emacsver.texi | |
19e9f435 | 73 | |
c12e4a81 | 74 | .PHONY: info dvi html pdf ps |
ea274122 | 75 | |
8496d8d7 GM |
76 | .SUFFIXES: .ps .dvi |
77 | ||
78 | .dvi.ps: | |
79 | $(DVIPS) -o $@ $< | |
80 | ||
40abffe4 | 81 | info: ${buildinfodir}/eintr.info |
4c83f6e1 | 82 | |
8496d8d7 GM |
83 | dvi: $(DVI_TARGETS) |
84 | html: $(HTML_TARGETS) | |
85 | pdf: $(PDF_TARGETS) | |
86 | ps: $(PS_TARGETS) | |
8cda6f8f | 87 | |
4c83f6e1 GM |
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. | |
f48a9cb4 | 90 | # Note: "<" is not portable in ordinary make rules. |
40abffe4 | 91 | ${buildinfodir}/eintr.info: ${srcs} |
abd40fb4 | 92 | $(mkinfodir) |
8045b906 | 93 | $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi |
8cda6f8f | 94 | |
19e9f435 | 95 | emacs-lisp-intro.dvi: ${srcs} |
f48a9cb4 | 96 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi |
8cda6f8f | 97 | |
19e9f435 | 98 | emacs-lisp-intro.pdf: ${srcs} |
f48a9cb4 | 99 | $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi |
b60bfecc | 100 | |
19e9f435 | 101 | emacs-lisp-intro.html: ${srcs} |
8496d8d7 | 102 | $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi |
8cda6f8f | 103 | |
4c83f6e1 GM |
104 | .PHONY: mostlyclean clean distclean maintainer-clean infoclean |
105 | ||
8cda6f8f | 106 | mostlyclean: |
4c83f6e1 GM |
107 | rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ |
108 | *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs | |
8cda6f8f GM |
109 | |
110 | clean: mostlyclean | |
8496d8d7 | 111 | rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) |
17ca7950 | 112 | rm -f emacs-lispintro-${version}.tar* |
8cda6f8f GM |
113 | |
114 | distclean: clean | |
26e4aa7d | 115 | rm -f Makefile |
8cda6f8f | 116 | |
4c83f6e1 | 117 | infoclean: |
eb36672f | 118 | rm -f \ |
40abffe4 GM |
119 | $(buildinfodir)/eintr.info \ |
120 | $(buildinfodir)/eintr.info-[1-9] | |
4c83f6e1 GM |
121 | |
122 | maintainer-clean: distclean infoclean | |
123 | ||
ea274122 GM |
124 | .PHONY: dist |
125 | ||
4c83f6e1 | 126 | dist: |
17ca7950 GM |
127 | rm -rf emacs-lispintro-${version} |
128 | mkdir emacs-lispintro-${version} | |
4c83f6e1 | 129 | cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \ |
09b98a01 | 130 | ${texinfodir}/texinfo.tex ${emacsdir}/emacsver.texi \ |
17ca7950 | 131 | ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/ |
4393405b | 132 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ |
09b98a01 | 133 | -e 's/^\(emacsdir *=\).*/\1 ./' \ |
2fecccba GM |
134 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ |
135 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | |
17ca7950 | 136 | -e "s/@ver[s]ion@/${version}/" \ |
789cf833 | 137 | -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \ |
17ca7950 | 138 | ${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile |
fc4893eb GM |
139 | @if grep '@[a-zA-Z_]*@' emacs-lispintro-${version}/Makefile; then \ |
140 | echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \ | |
141 | fi | |
17ca7950 GM |
142 | tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version} |
143 | rm -rf emacs-lispintro-${version} | |
8cda6f8f | 144 | |
8496d8d7 GM |
145 | |
146 | .PHONY: install-dvi install-html install-pdf install-ps install-doc | |
147 | ||
148 | install-dvi: dvi | |
48f73cfb GM |
149 | umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)" |
150 | $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)" | |
8496d8d7 | 151 | install-html: html |
48f73cfb GM |
152 | umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)" |
153 | $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)" | |
8496d8d7 | 154 | install-pdf: pdf |
48f73cfb GM |
155 | umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)" |
156 | $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)" | |
8496d8d7 | 157 | install-ps: ps |
48f73cfb | 158 | umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)" |
8496d8d7 | 159 | for file in $(PS_TARGETS); do \ |
48f73cfb | 160 | $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \ |
8496d8d7 | 161 | [ -n "${GZIP_PROG}" ] || continue; \ |
48f73cfb GM |
162 | rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \ |
163 | ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \ | |
8496d8d7 GM |
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 \ | |
48f73cfb | 174 | rm -f "$(DESTDIR)$(dvidir)/$${file}"; \ |
8496d8d7 GM |
175 | done |
176 | uninstall-html: | |
177 | for file in $(HTML_TARGETS); do \ | |
48f73cfb | 178 | rm -f "$(DESTDIR)$(htmldir)/$${file}"; \ |
8496d8d7 GM |
179 | done |
180 | uninstall-ps: | |
181 | ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \ | |
182 | for file in $(PS_TARGETS); do \ | |
48f73cfb | 183 | rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \ |
8496d8d7 GM |
184 | done |
185 | uninstall-pdf: | |
186 | for file in $(PDF_TARGETS); do \ | |
48f73cfb | 187 | rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \ |
8496d8d7 GM |
188 | done |
189 | ||
190 | uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps | |
191 | ||
192 | ||
4c83f6e1 | 193 | ### Makefile ends here |