.mdw-build.conf: Don't try `vpath' builds with this package.
[mdwfonts] / Makefile.m4
CommitLineData
407a7e92 1## -*-m4-*-
c369c819 2##
c369c819 3## Build system for mdwfonts
4##
5## (c) 2002 Mark Wooding
6##
7
8##----- Licensing notice ----------------------------------------------------
9##
10## This file is part of the mdwfonts font configuration system.
11##
12## mdwfonts 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.
407a7e92 16##
c369c819 17## mdwfonts 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.
407a7e92 21##
c369c819 22## You should have received a copy of the GNU General Public License
23## along with mdwfonts; if not, write to the Free Software Foundation,
24## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
c369c819 26AUTOMAKE_OPTIONS = foreign
27
d9cfedf1
MW
28pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE}
29pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE}
30pkgtfmdir = ${texmfdir}/fonts/tfm/${PACKAGE}
31pkgvfdir = ${texmfdir}/fonts/vf/${PACKAGE}
32pkgetxdir = ${texmfdir}/tex/fontinst/${PACKAGE}
8ae061c5 33pkmapdir = ${texmfdir}/fonts/map/${PACKAGE}
c369c819 34
35FONTINST = @FONTINST@
36
37define(`addsuffix', `patsubst(`$1', `\>', `$2')')
38define(`BASE', `mdwfonts')
39define(`TFMBASE', `\
a8ca648c 40 pcrb8rn pcrbo8rn pcrr8rn pcrro8rn')
c369c819 41define(`VFBASE', `\
42 pcrb7tn pcrb8tn pcrbc7tn pcrbc8tn pcrbo7tn pcrbo8tn pcrr7tn pcrr8tn \
43 pcrrc7tn pcrrc8tn pcrro7tn pcrro8tn zpplcmr zpplcmrm')
44
45AUX = gpl.tex
46SRC = addsuffix(BASE, `.dtx')
47DVI = addsuffix(BASE, `.dvi')
407a7e92
MW
48PS = addsuffix(BASE, `.ps')
49PDF = addsuffix(BASE, `.pdf')
c369c819 50ETX = ot1tt.etx ot1ctt.etx
e5ce4845 51INS = mdwfonts.sty mdwfonts.tex mttpcr.fd
52MAP = mdwfonts.map
c369c819 53FD = omlpplcm.fd ot1pplcm.fd
54PL = addsuffix(TFMBASE, `.pl')
55VPL = addsuffix(VFBASE, `.vpl')
56TFM = addsuffix(TFMBASE, `.tfm') addsuffix(VFBASE, `.tfm')
57VF = addsuffix(VFBASE, `.vf')
58
59pkglatex_DATA = $(INS) $(FD)
407a7e92 60pkgdoc_DATA = $(DVI) $(PS) $(PDF)
c369c819 61pkgtfm_DATA = $(TFM)
62pkgvf_DATA = $(VF)
63pkgetx_DATA = $(ETX)
e5ce4845 64pkmap_DATA = $(MAP)
c369c819 65
407a7e92 66SUFFIXES = .dtx .dvi .vf .tfm .pl .vpl .ps .pdf
c369c819 67define(`run_latex', `latex "\def\indexing{n} \nonstopmode \input $<"
68 latex "\def\indexing{y} \nonstopmode \input $<"
69 makeindex -s gind.ist $`'*.idx
70 latex "\def\indexing{n} \nonstopmode \input $<"')
71
98eaa213
MW
72$(DVI): $(AUX) $(INS)
73.dtx.dvi: run_latex
407a7e92
MW
74.dvi.ps:; dvips $<
75.ps.pdf:; ps2pdf $< $@
c369c819 76.vpl.tfm:; vptovf $<
77.pl.tfm:; pltotf $<
78.vpl.vf:; vptovf $<
79
6ec4764f 80$(ETX) $(MAP) $(INS): $(SRC) mdwfonts.ins
c369c819 81 tex "\nonstopmode \input mdwfonts.ins"
82$(FD) $(VF) $(PL) $(VPL): mdwfonts.tex $(ETX)
83 $(FONTINST) "\nonstopmode \input mdwfonts.tex"
84
85EXTRA_DIST = \
91fa74d7 86 $(SRC) $(AUX) $(INS) $(ETX) $(FD) $(TFM) $(VF) $(PL) $(VPL) $(DVI) \
6ec4764f 87 $(MAP) \
c369c819 88 mdwfonts.ins Makefile.m4
89
90MAINTAINERCLEANFILES = $(INS) $(ETX) $(TFM) $(VF) $(DVI) *.fd
91CLEANFILES = \
98eaa213 92 *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans *.vpl \
407a7e92 93 p*.pl p*.mtx c*.mtx *.ps *.pdf
98eaa213 94
c369c819 95Makefile.am: Makefile.m4
96 cd $(srcdir) && m4 Makefile.m4 >Makefile.am
97
a7875f2f
MW
98dist-hook::
99 echo $(VERSION) >$(distdir)/RELEASE
100EXTRA_DIST += auto-version
101
00a3798f
MW
102EXTRA_DIST += debian/changelog debian/control debian/copyright debian/compat
103EXTRA_DIST += debian/rules
104
105EXTRA_DIST += debian/mdwfonts.install
106EXTRA_DIST += debian/mdwfonts.docs debian/mdwfonts.maps
107
c369c819 108.PHONY: dvi
109
110##----- That's all, folks ---------------------------------------------------