Commit | Line | Data |
---|---|---|
86f6a31e | 1 | ## -*-makefile-*- |
2 | ## | |
86f6a31e | 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. | |
e8e9e5d8 | 16 | ## |
86f6a31e | 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. | |
e8e9e5d8 | 21 | ## |
86f6a31e | 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 | ||
86f6a31e | 26 | AUTOMAKE_OPTIONS = foreign |
27 | ||
65bf31fc MW |
28 | pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE} |
29 | pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE} | |
86f6a31e | 30 | |
950ff97f | 31 | define(`addsuffix', `patsubst(`$1', `\>', `$2')') |
86f6a31e | 32 | define(`BASE', `\ |
83b69571 | 33 | at centre cmtt colour crypto doafter exercise footnote mdwkey \ |
e8f3554e | 34 | mdwlist mdwmath mdwref mdwtab mdwthm poetry slowbox sverb syntax') |
86f6a31e | 35 | |
8c890f24 | 36 | AUX = mdwtools.tex gpl.tex |
950ff97f | 37 | SRC = addsuffix(BASE, `.dtx') |
38 | DVI = addsuffix(BASE, `.dvi') mdwtools.dvi | |
83b69571 | 39 | PS = addsuffix(BASE, `.ps') mdwtools.ps |
6d6d46d2 | 40 | PDF = addsuffix(BASE, `.pdf') mdwtools.pdf |
86f6a31e | 41 | OBJ = \ |
42 | at.sty \ | |
950ff97f | 43 | cmtt.sty mttcmtt.fd mttenc.def \ |
61253765 | 44 | centre.sty \ |
83b69571 | 45 | colour.sty \ |
86f6a31e | 46 | crypto.sty \ |
47 | doafter.sty \ | |
48 | doafter.tex \ | |
49 | exercise.sty \ | |
50 | footnote.sty \ | |
83b69571 | 51 | mdwkey.sty \ |
86f6a31e | 52 | mdwlist.sty \ |
53 | mdwmath.sty \ | |
e8f3554e | 54 | mdwref.sty \ |
83b69571 | 55 | mdwtab.sty mathenv.sty mtcolour.sty mtcolor.sty \ |
86f6a31e | 56 | mdwthm.sty mdwmargin.thm \ |
57 | poetry.sty \ | |
83b69571 | 58 | slowbox.sty \ |
59 | sverb.sty svcolor.sty svcolour.sty svsplit.sty \ | |
86f6a31e | 60 | syntax.sty |
61 | ||
8c890f24 | 62 | pkglatex_DATA = $(OBJ) mdwtools.tex |
6d6d46d2 | 63 | pkgdoc_DATA = $(DVI) $(PS) $(PDF) |
86f6a31e | 64 | |
83b69571 | 65 | SUFFIXES = .dtx .tex .dvi .ps |
68953ace MW |
66 | define(`run_latex', `rm -rf t.$`'@/ && mkdir t.$`'@/ && \ |
67 | cd t.$`'@/ && \ | |
68 | TEXINPUTS=..:$$TEXINPUTS && export TEXINPUTS && \ | |
f80a2d4b MW |
69 | $1 "\def\indexing{n} \nonstopmode \input $<" && \ |
70 | $1 "\def\indexing{y} \nonstopmode \input $<" && \ | |
68953ace | 71 | makeindex -s gind.ist $`'*.idx && \ |
f80a2d4b | 72 | $1 "\def\indexing{n} \nonstopmode \input $<" && \ |
68953ace | 73 | mv $`'@ ../ && cd ../ && rm -rf t.$`'@/') |
86f6a31e | 74 | |
f80a2d4b MW |
75 | .dtx.dvi:; run_latex(`latex') |
76 | .tex.dvi:; run_latex(`latex') | |
d8b70202 MW |
77 | .dtx.pdf:; run_latex(`pdflatex') |
78 | .tex.pdf:; run_latex(`pdflatex') | |
d59b624c | 79 | .dvi.ps:; dvips -e0 -o $@ $< |
68953ace | 80 | clean-local::; rm -rf t.*/ |
83b69571 | 81 | |
d8b70202 | 82 | $(DVI) $(PDF): gpl.tex $(OBJ) mdwtools.tex |
86f6a31e | 83 | |
d03425ae MW |
84 | $(wordlist 2,$(words $(OBJ)),$(OBJ)): $(firstword $(OBJ)) |
85 | $(firstword $(OBJ)): $(SRC) mdwtools.ins | |
86f6a31e | 86 | tex mdwtools.ins |
87 | ||
91f031ff MW |
88 | EXTRA_DIST = $(SRC) $(AUX) $(DVI) $(OBJ) $(PS) $(PDF) \ |
89 | mdwtools.ins Makefile.m4 | |
8c890f24 | 90 | |
06ac62a3 | 91 | MAINTAINERCLEANFILES = $(OBJ) $(DVI) $(PS) $(PDF) |
86f6a31e | 92 | CLEANFILES = *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans |
93 | ||
94 | Makefile.am: Makefile.m4 | |
83b69571 | 95 | m4 $(srcdir)/Makefile.m4 >Makefile.am.new |
96 | mv Makefile.am.new $(srcdir)/Makefile.am | |
86f6a31e | 97 | |
d3d35d4b MW |
98 | dist-hook:: |
99 | echo $(VERSION) >$(distdir)/RELEASE | |
100 | EXTRA_DIST += auto-version | |
101 | ||
3aea29e2 MW |
102 | EXTRA_DIST += debian/changelog debian/control debian/copyright debian/compat |
103 | EXTRA_DIST += debian/rules | |
104 | ||
86f6a31e | 105 | .PHONY: dvi |
106 | ||
107 | ##----- That's all, folks --------------------------------------------------- |