build: Use ACLTX_TEXMF_PATH for installation.
[mdwtools] / Makefile.m4
1 ## -*-makefile-*-
2 ##
3 ## Build system for mdwtools
4 ##
5 ## (c) 2002 Mark Wooding
6 ##
7
8 ##----- Licensing notice ----------------------------------------------------
9 ##
10 ## This file is part of the mdwtools LaTeX package collection.
11 ##
12 ## mdwtools is free software; you can redistribute it and/or modify
13 ## it under the terms of the GNU General Public License as published by
14 ## the Free Software Foundation; either version 2 of the License, or
15 ## (at your option) any later version.
16 ##
17 ## mdwtools is distributed in the hope that it will be useful,
18 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ## GNU General Public License for more details.
21 ##
22 ## You should have received a copy of the GNU General Public License
23 ## along with mdwtools; if not, write to the Free Software Foundation,
24 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26 AUTOMAKE_OPTIONS = foreign
27
28 texmfpath = @texmfpath@
29 pkglatexdir = ${texmfpath}/tex/latex/${PACKAGE}
30 pkgdocdir = ${texmfpath}/doc/latex/${PACKAGE}
31
32 define(`addsuffix', `patsubst(`$1', `\>', `$2')')
33 define(`BASE', `\
34 at centre cmtt colour crypto doafter exercise footnote mdwkey \
35 mdwlist mdwmath mdwref mdwtab mdwthm poetry slowbox sverb syntax')
36
37 AUX = mdwtools.tex gpl.tex
38 SRC = addsuffix(BASE, `.dtx')
39 DVI = addsuffix(BASE, `.dvi') mdwtools.dvi
40 PS = addsuffix(BASE, `.ps') mdwtools.ps
41 OBJ = \
42 at.sty \
43 cmtt.sty mttcmtt.fd mttenc.def \
44 colour.sty \
45 crypto.sty \
46 doafter.sty \
47 doafter.tex \
48 exercise.sty \
49 footnote.sty \
50 mdwkey.sty \
51 mdwlist.sty \
52 mdwmath.sty \
53 mdwref.sty \
54 mdwtab.sty mathenv.sty mtcolour.sty mtcolor.sty \
55 mdwthm.sty mdwmargin.thm \
56 poetry.sty \
57 slowbox.sty \
58 sverb.sty svcolor.sty svcolour.sty svsplit.sty \
59 syntax.sty
60
61 pkglatex_DATA = $(OBJ) mdwtools.tex
62 pkgdoc_DATA = $(DVI) $(PS)
63
64 SUFFIXES = .dtx .tex .dvi .ps
65 define(`run_latex', `latex "\def\indexing{n} \nonstopmode \input $<"
66 latex "\def\indexing{y} \nonstopmode \input $<"
67 makeindex -s gind.ist $`'*.idx
68 latex "\def\indexing{n} \nonstopmode \input $<"')
69
70 .dtx.dvi:
71 run_latex
72 .tex.dvi:
73 run_latex
74 .dvi.ps:
75 dvips -e0 -o $@ $<
76
77 $(DVI): gpl.tex $(OBJ) mdwtools.tex
78
79 $(OBJ): $(SRC) mdwtools.ins
80 tex mdwtools.ins
81
82 EXTRA_DIST = $(SRC) $(AUX) $(DVI) $(OBJ) $(PS) mdwtools.ins Makefile.m4
83
84 MAINTAINERCLEANFILES = $(OBJ) $(DVI)
85 CLEANFILES = *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans
86
87 Makefile.am: Makefile.m4
88 m4 $(srcdir)/Makefile.m4 >Makefile.am.new
89 mv Makefile.am.new $(srcdir)/Makefile.am
90
91 .PHONY: dvi
92
93 ##----- That's all, folks ---------------------------------------------------