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