Commit | Line | Data |
---|---|---|
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 | 26 | AUTOMAKE_OPTIONS = foreign |
27 | ||
d9cfedf1 MW |
28 | pkglatexdir = ${texmfdir}/tex/latex/${PACKAGE} |
29 | pkgdocdir = ${texmfdir}/doc/latex/${PACKAGE} | |
30 | pkgtfmdir = ${texmfdir}/fonts/tfm/${PACKAGE} | |
31 | pkgvfdir = ${texmfdir}/fonts/vf/${PACKAGE} | |
32 | pkgetxdir = ${texmfdir}/tex/fontinst/${PACKAGE} | |
8ae061c5 | 33 | pkmapdir = ${texmfdir}/fonts/map/${PACKAGE} |
c369c819 | 34 | |
35 | FONTINST = @FONTINST@ | |
36 | ||
37 | define(`addsuffix', `patsubst(`$1', `\>', `$2')') | |
38 | define(`BASE', `mdwfonts') | |
39 | define(`TFMBASE', `\ | |
a8ca648c | 40 | pcrb8rn pcrbo8rn pcrr8rn pcrro8rn') |
c369c819 | 41 | define(`VFBASE', `\ |
42 | pcrb7tn pcrb8tn pcrbc7tn pcrbc8tn pcrbo7tn pcrbo8tn pcrr7tn pcrr8tn \ | |
43 | pcrrc7tn pcrrc8tn pcrro7tn pcrro8tn zpplcmr zpplcmrm') | |
44 | ||
45 | AUX = gpl.tex | |
46 | SRC = addsuffix(BASE, `.dtx') | |
47 | DVI = addsuffix(BASE, `.dvi') | |
407a7e92 MW |
48 | PS = addsuffix(BASE, `.ps') |
49 | PDF = addsuffix(BASE, `.pdf') | |
c369c819 | 50 | ETX = ot1tt.etx ot1ctt.etx |
e5ce4845 | 51 | INS = mdwfonts.sty mdwfonts.tex mttpcr.fd |
52 | MAP = mdwfonts.map | |
c369c819 | 53 | FD = omlpplcm.fd ot1pplcm.fd |
54 | PL = addsuffix(TFMBASE, `.pl') | |
55 | VPL = addsuffix(VFBASE, `.vpl') | |
56 | TFM = addsuffix(TFMBASE, `.tfm') addsuffix(VFBASE, `.tfm') | |
57 | VF = addsuffix(VFBASE, `.vf') | |
58 | ||
59 | pkglatex_DATA = $(INS) $(FD) | |
407a7e92 | 60 | pkgdoc_DATA = $(DVI) $(PS) $(PDF) |
c369c819 | 61 | pkgtfm_DATA = $(TFM) |
62 | pkgvf_DATA = $(VF) | |
63 | pkgetx_DATA = $(ETX) | |
e5ce4845 | 64 | pkmap_DATA = $(MAP) |
c369c819 | 65 | |
407a7e92 | 66 | SUFFIXES = .dtx .dvi .vf .tfm .pl .vpl .ps .pdf |
c1c59706 MW |
67 | define(`run_latex', `rm -rf t.$`'@/ && mkdir t.$`'@/ && \ |
68 | cd t.$`'@/ && \ | |
69 | TEXINPUTS=..:$$TEXINPUTS && export TEXINPUTS && \ | |
70 | $1 "\def\indexing{n} \nonstopmode \input $<" && \ | |
71 | $1 "\def\indexing{y} \nonstopmode \input $<" && \ | |
72 | makeindex -s gind.ist $`'*.idx && \ | |
73 | $1 "\def\indexing{n} \nonstopmode \input $<" && \ | |
74 | mv $`'@ ../ && cd ../ && rm -rf t.$`'@/') | |
75 | ||
45219ddd | 76 | $(DVI) $(PDF): $(AUX) $(INS) $(FD) |
c1c59706 MW |
77 | .dtx.dvi:; run_latex(`latex') |
78 | .dtx.pdf:; run_latex(`pdflatex') | |
407a7e92 | 79 | .dvi.ps:; dvips $< |
c369c819 | 80 | .vpl.tfm:; vptovf $< |
81 | .pl.tfm:; pltotf $< | |
82 | .vpl.vf:; vptovf $< | |
c1c59706 | 83 | clean-local::; rm -rf t.*/ |
c369c819 | 84 | |
fdc9e984 MW |
85 | $(wordlist 2,$(words $(ETX)),$(ETX)) $(MAP) $(INS): $(firstword $(ETX)) |
86 | $(firstword $(ETX)): $(SRC) mdwfonts.ins | |
c369c819 | 87 | tex "\nonstopmode \input mdwfonts.ins" |
fdc9e984 MW |
88 | $(wordlist 2,$(words $(FD)),$(FD)) $(VF) $(PL) $(VPL): $(firstword $(FD)) |
89 | $(firstword $(FD)): mdwfonts.tex $(ETX) | |
c369c819 | 90 | $(FONTINST) "\nonstopmode \input mdwfonts.tex" |
91 | ||
92 | EXTRA_DIST = \ | |
91fa74d7 | 93 | $(SRC) $(AUX) $(INS) $(ETX) $(FD) $(TFM) $(VF) $(PL) $(VPL) $(DVI) \ |
f4bd4086 | 94 | $(MAP) $(PS) $(PDF) \ |
c369c819 | 95 | mdwfonts.ins Makefile.m4 |
96 | ||
97 | MAINTAINERCLEANFILES = $(INS) $(ETX) $(TFM) $(VF) $(DVI) *.fd | |
98 | CLEANFILES = \ | |
98eaa213 | 99 | *.tmp *.aux *.idx *.ilg *.log *.toc *.ind *.lot *.ans *.vpl \ |
407a7e92 | 100 | p*.pl p*.mtx c*.mtx *.ps *.pdf |
98eaa213 | 101 | |
c369c819 | 102 | Makefile.am: Makefile.m4 |
103 | cd $(srcdir) && m4 Makefile.m4 >Makefile.am | |
104 | ||
a7875f2f MW |
105 | dist-hook:: |
106 | echo $(VERSION) >$(distdir)/RELEASE | |
107 | EXTRA_DIST += auto-version | |
108 | ||
00a3798f MW |
109 | EXTRA_DIST += debian/changelog debian/control debian/copyright debian/compat |
110 | EXTRA_DIST += debian/rules | |
111 | ||
112 | EXTRA_DIST += debian/mdwfonts.install | |
113 | EXTRA_DIST += debian/mdwfonts.docs debian/mdwfonts.maps | |
114 | ||
c369c819 | 115 | .PHONY: dvi |
116 | ||
117 | ##----- That's all, folks --------------------------------------------------- |