Makefile.in 3.76 KB
Newer Older
1
### @configure_input@
Glenn Morris's avatar
Glenn Morris committed
2

3
# Copyright (C) 1994-1999, 2001-2013 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
# NB If you add any more configure variables,
# update the sed rules in the dist target below.
Glenn Morris's avatar
Glenn Morris committed
24
srcdir = @srcdir@
25
version=@version@
Glenn Morris's avatar
Glenn Morris committed
26

27
buildinfodir = $(srcdir)/../../info
28 29
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
Glenn Morris's avatar
Glenn Morris committed
30 31
# Directory with emacsver.texi.
emacsdir =  $(srcdir)/../emacs
Glenn Morris's avatar
Glenn Morris committed
32

33 34
MKDIR_P = @MKDIR_P@

35 36 37 38
INFO_EXT=@INFO_EXT@
# Options used only when making info output.
INFO_OPTS=@INFO_OPTS@

39
MAKEINFO = @MAKEINFO@
Glenn Morris's avatar
Glenn Morris committed
40
MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir)
Glenn Morris's avatar
Glenn Morris committed
41
TEXI2DVI = texi2dvi
Glenn Morris's avatar
Glenn Morris committed
42
TEXI2PDF = texi2pdf
Glenn Morris's avatar
Glenn Morris committed
43 44
DVIPS = dvips

Glenn Morris's avatar
Glenn Morris committed
45
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
46 47
         MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"

48
mkinfodir = @${MKDIR_P} ${buildinfodir}
49

Glenn Morris's avatar
Glenn Morris committed
50 51
srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \
  ${emacsdir}/emacsver.texi
52

53
.PHONY: info dvi html pdf ps
Glenn Morris's avatar
Glenn Morris committed
54

55
info: ${buildinfodir}/eintr$(INFO_EXT)
56 57 58 59

dvi: emacs-lisp-intro.dvi
html: emacs-lisp-intro.html
pdf: emacs-lisp-intro.pdf
60
ps: emacs-lisp-intro.ps
Glenn Morris's avatar
Glenn Morris committed
61

62 63
# The file name eintr must fit within 5 characters, to allow for
# -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}
66
	$(mkinfodir)
67
	$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
68

69
emacs-lisp-intro.dvi: ${srcs}
70
	$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
71

72
emacs-lisp-intro.ps: emacs-lisp-intro.dvi
73
	$(DVIPS) -o $@ emacs-lisp-intro.dvi
74

75
emacs-lisp-intro.pdf: ${srcs}
76
	$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
77

78
emacs-lisp-intro.html: ${srcs}
79
	$(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs-lisp-intro.texi
Glenn Morris's avatar
Glenn Morris committed
80

81 82
.PHONY: mostlyclean clean distclean maintainer-clean infoclean

Glenn Morris's avatar
Glenn Morris committed
83
mostlyclean:
84 85
	rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
	  *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
Glenn Morris's avatar
Glenn Morris committed
86 87

clean: mostlyclean
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*
Glenn Morris's avatar
Glenn Morris committed
91 92 93

distclean: clean

94
infoclean:
95
	-cd $(buildinfodir) && rm -f eintr$(INFO_EXT) eintr$(INFO_EXT)-[1-9]
96 97 98

maintainer-clean: distclean infoclean

Glenn Morris's avatar
Glenn Morris committed
99 100
.PHONY: dist

101
dist:
102 103
	rm -rf emacs-lispintro-${version}
	mkdir emacs-lispintro-${version}
104
	cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \
Glenn Morris's avatar
Glenn Morris committed
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 ./' \
Glenn Morris's avatar
Glenn Morris committed
108
	  -e 's/^\(emacsdir *=\).*/\1 ./' \
109 110
	  -e 's/^\(buildinfodir *=\).*/\1 ./' \
	  -e 's/^\(clean:.*\)/\1 infoclean/' \
111
	  -e "s/@ver[s]ion@/${version}/" \
112 113
	  -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
	  -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
114
	  ${srcdir}/Makefile.in > emacs-lispintro-${version}/Makefile
115 116 117
	@if grep '@[a-zA-Z_]*@' emacs-lispintro-${version}/Makefile; then \
	  echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
	fi
118 119
	tar -cf emacs-lispintro-${version}.tar emacs-lispintro-${version}
	rm -rf emacs-lispintro-${version}
Glenn Morris's avatar
Glenn Morris committed
120

121
### Makefile ends here