1 #### Makefile for the Emacs Lisp Introduction manual
3 # Copyright (C) 1994-1999, 2001-2013 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
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.
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.
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/>.
22 # NB If you add any more configure variables,
23 # update the sed rules in the dist target below.
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
36 # Options used only when making info output.
40 MAKEINFO_OPTS
= --force -I
$(emacsdir
) -I
$(srcdir)
45 ENVADD
= TEXINPUTS
="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
46 MAKEINFO
="$(MAKEINFO) $(MAKEINFO_OPTS)"
48 mkinfodir
= @
${MKDIR_P} ${buildinfodir}
50 srcs
= ${srcdir}/emacs-lisp-intro.texi
${srcdir}/doclicense.texi \
51 ${emacsdir}/emacsver.texi
53 .PHONY
: info dvi html pdf ps
55 info: ${buildinfodir}/eintr
$(INFO_EXT
)
57 dvi: emacs-lisp-intro.
dvi
58 html
: emacs-lisp-intro.html
59 pdf
: emacs-lisp-intro.pdf
60 ps
: emacs-lisp-intro.ps
62 # The file name eintr must fit within 5 characters, to allow for
63 # -NN extensions to fit into DOS 8+3 limits without clashing.
64 # Note: "<" is not portable in ordinary make rules.
65 ${buildinfodir}/eintr
$(INFO_EXT
): ${srcs}
67 $(MAKEINFO
) $(MAKEINFO_OPTS
) $(INFO_OPTS
) -o
$@
${srcdir}/emacs-lisp-intro.texi
69 emacs-lisp-intro.
dvi: ${srcs}
70 $(ENVADD
) $(TEXI2DVI
) ${srcdir}/emacs-lisp-intro.texi
72 emacs-lisp-intro.ps
: emacs-lisp-intro.
dvi
73 $(DVIPS
) -o
$@ emacs-lisp-intro.
dvi
75 emacs-lisp-intro.pdf
: ${srcs}
76 $(ENVADD
) $(TEXI2PDF
) ${srcdir}/emacs-lisp-intro.texi
78 emacs-lisp-intro.html
: ${srcs}
79 $(MAKEINFO
) $(MAKEINFO_OPTS
) --html
-o
$@
${srcdir}/emacs-lisp-intro.texi
81 .PHONY
: mostlyclean clean distclean maintainer-clean infoclean
84 rm -f
*.aux
*.log
*.toc
*.cp
*.cps
*.fn
*.fns
*.ky
*.kys \
85 *.op
*.ops
*.pg
*.pgs
*.tp
*.tps
*.vr
*.vrs
88 rm -f emacs-lisp-intro.
dvi emacs-lisp-intro.pdf emacs-lisp-intro.ps
89 rm -rf emacs-lisp-intro.html
/
90 rm -f emacs-lispintro-
${version}.
tar*
95 -cd
$(buildinfodir
) && rm -f eintr
$(INFO_EXT
) eintr
$(INFO_EXT
)-[1-9]
97 maintainer-clean
: distclean infoclean
102 rm -rf emacs-lispintro-
${version}
103 mkdir emacs-lispintro-
${version}
104 cp
${srcdir}/*.texi
${srcdir}/*.eps
${srcdir}/*.pdf \
105 ${texinfodir}/texinfo.
tex ${emacsdir}/emacsver.texi \
106 ${srcdir}/ChangeLog
* ${srcdir}/README emacs-lispintro-
${version}/
107 sed
-e
's/@sr[c]dir@/./' -e
's/^\(texinfodir *=\).*/\1 ./' \
108 -e
's/^\(emacsdir *=\).*/\1 ./' \
109 -e
's/^\(buildinfodir *=\).*/\1 ./' \
110 -e
's/^\(clean:.*\)/\1 infoclean/' \
111 -e
"s/@ver[s]ion@/${version}/" \
112 -e
's/@MAKE[I]NFO@/makeinfo/' -e
's/@MK[D]IR_P@/mkdir -p/' \
113 -e
's/@IN[F]O_EXT@/.info/' -e
's/@IN[F]O_OPTS@//' \
114 ${srcdir}/Makefile.in
> emacs-lispintro-
${version}/Makefile
115 @if grep
'@[a-zA-Z_]*@' emacs-lispintro-
${version}/Makefile
; then \
116 echo
"Unexpanded configure variables in Makefile?" 1>&2; exit
1; \
118 tar -cf emacs-lispintro-
${version}.
tar emacs-lispintro-
${version}
119 rm -rf emacs-lispintro-
${version}
121 ### Makefile ends here