86f6a31e |
1 | ## -*-makefile-*- |
2 | ## |
3 | ## $Id: Makefile.m4,v 1.1 2002/02/03 20:49:02 mdw Exp $ |
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 $ |
31 | ## Revision 1.1 2002/02/03 20:49:02 mdw |
32 | ## Checkin for new build system. |
33 | ## |
34 | |
35 | AUTOMAKE_OPTIONS = foreign |
36 | |
37 | texmfdir = @texmfdir@ |
38 | pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE} |
39 | pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE} |
40 | |
41 | define(`addsuffix', `patsubst(`$1', `\>', `.$2')') |
42 | define(`BASE', `\ |
43 | at cmtt crypto doafter exercise footnote \ |
44 | mdwlist mdwmath mdwtab mdwthm poetry sverb syntax') |
45 | |
46 | SRC = addsuffix(BASE, `dtx') |
47 | DVI = addsuffix(BASE, `dvi') mdwtools.dvi |
48 | OBJ = \ |
49 | at.sty \ |
50 | cmtt.sty mTTcmtt.fd mTTenc.def \ |
51 | crypto.sty \ |
52 | doafter.sty \ |
53 | doafter.tex \ |
54 | exercise.sty \ |
55 | footnote.sty \ |
56 | mdwlist.sty \ |
57 | mdwmath.sty \ |
58 | mdwtab.sty mathenv.sty \ |
59 | mdwthm.sty mdwmargin.thm \ |
60 | poetry.sty \ |
61 | sverb.sty \ |
62 | syntax.sty |
63 | |
64 | pkglatex_DATA = $(OBJ) |
65 | pkgdoc_DATA = $(DVI) |
66 | |
67 | SUFFIXES = .dtx .tex .dvi |
68 | define(`run_latex', `latex "\def\indexing{n} \nonstopmode \input $<" |
69 | latex "\def\indexing{y} \nonstopmode \input $<" |
70 | makeindex -s gind.ist $`'*.idx |
71 | latex "\def\indexing{n} \nonstopmode \input $<"') |
72 | |
73 | .dtx.dvi: gpl.tex mdwtools.tex |
74 | run_latex |
75 | .tex.dvi: gpl.tex |
76 | run_latex |
77 | |
78 | all: $(OBJ) |
79 | dvi: $(DVI) |
80 | |
81 | $(OBJ): $(SRC) mdwtools.ins |
82 | tex mdwtools.ins |
83 | |
84 | MAINTAINERCLEANFILES = $(OBJ) $(DVI) |
85 | CLEANFILES = *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans |
86 | |
87 | Makefile.am: Makefile.m4 |
88 | cd $(srcdir) && m4 Makefile.m4 >Makefile.am |
89 | |
90 | .PHONY: dvi |
91 | |
92 | ##----- That's all, folks --------------------------------------------------- |