debian/: Preparation and fixing for release.
[strayman] / Makefile.m4
CommitLineData
e673b6d1 1## -*-m4-*-
1ffa9044 2##
1ffa9044 3## Build system for strayman
4##
5## (c) 2002 Mark Wooding
6##
7
8##----- Licensing notice ----------------------------------------------------
9##
10## This file is part of the Straylight Manual LaTeX document class.
11##
12## strayman 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.
deee9d1f 16##
1ffa9044 17## strayman 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.
deee9d1f 21##
1ffa9044 22## You should have received a copy of the GNU General Public License
23## along with strayman; if not, write to the Free Software Foundation,
24## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
8fc29298
MW
26pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE}
27pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE}
1ffa9044 28
29define(`addsuffix', `patsubst(`$1', `\>', `$2')')
30define(`BASE', `strayman')
31
32AUX = gpl.tex strayman.cls
33SRC = addsuffix(BASE, `.dtx')
34DVI = addsuffix(BASE, `.dvi')
e673b6d1
MW
35PS = addsuffix(BASE, `.ps')
36PDF = addsuffix(BASE, `.pdf')
1ffa9044 37OBJ = \
38 strayman.8pt \
39 strayman.9pt \
40 strayman.10pt \
41 strayman.11pt \
42 strayman.12pt \
43 strayman.text \
44 strayman.cls
45
46pkglatex_DATA = $(OBJ)
e673b6d1 47pkgdoc_DATA = $(DVI) $(PS) $(PDF)
1ffa9044 48
e673b6d1 49SUFFIXES = .dtx .tex .dvi .ps .pdf
96141069
MW
50define(`run_latex', `rm -rf t.$`'@/ && mkdir t.$`'@/ && \
51 cd t.$`'@/ && \
52 TEXINPUTS=..:$$TEXINPUTS && export TEXINPUTS && \
53 $1 "\def\indexing{n} \nonstopmode \input $<" && \
54 $1 "\def\indexing{y} \nonstopmode \input $<" && \
55 makeindex -s gind.ist $`'*.idx && \
56 $1 "\def\indexing{n} \nonstopmode \input $<" && \
57 mv $`'@ ../ && cd ../ && rm -rf t.$`'@/')
1ffa9044 58
96141069
MW
59$(DVI) $(PDF): $(OBJ) $(AUX)
60.dtx.dvi:; run_latex(`latex')
61.dtx.pdf:; run_latex(`pdflatex')
e673b6d1 62.dvi.ps:; dvips $<
96141069 63clean-local::; rm -rf t.*/
1ffa9044 64
65$(OBJ): $(SRC) strayman.ins
66 tex strayman.ins
67
68EXTRA_DIST = $(SRC) $(AUX) $(DVI) $(OBJ) strayman.ins Makefile.m4
69
70MAINTAINERCLEANFILES = $(OBJ) $(DVI)
e673b6d1 71CLEANFILES = *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans *.ps *.pdf
1ffa9044 72
36bc1cc4
MW
73dist-hook::
74 echo $(VERSION) >$(distdir)/RELEASE
75EXTRA_DIST += auto-version
76
1ffa9044 77Makefile.am: Makefile.m4
78 cd $(srcdir) && m4 Makefile.m4 >Makefile.am
79
80.PHONY: dvi
81
a9e5961e
MW
82EXTRA_DIST += debian/changelog debian/control debian/copyright debian/compat
83EXTRA_DIST += debian/rules
84
1ffa9044 85##----- That's all, folks ---------------------------------------------------