File: Makefile

package info (click to toggle)
xfonts-mona 2.11-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,028 kB
  • ctags: 197
  • sloc: perl: 2,600; makefile: 329; lisp: 68
file content (203 lines) | stat: -rw-r--r-- 6,971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#  Makefile for Mona fonts
#  by 1@2ch, 2002, public domain

VERSION = 2.11

## Machine dependent

SED_CMD		= sed
PERL_CMD	= perl

# for XFree86
GZIP_CMD	= gzip
GZIP_SUFFIX	= gz

# for traditional Xserver (SunOS, HP-UX, Tru64 etc.)
#GZIP_CMD	= compress
#GZIP_SUFFIX	= Z

X11BINDIR	= /usr/X11R6/bin
X11FONTDIR	= /usr/X11R6/lib/X11/fonts/local
BDFTOPCF	= $(X11BINDIR)/bdftopcf
MKDIRHIER	= $(X11BINDIR)/mkdirhier	# 'mkdir -p' may also work.
MKFONTDIR	= $(X11BINDIR)/mkfontdir

## Other macros

BIT2BDF	= $(PERL_CMD) tools/bit2bdf
BDFMERGE= $(PERL_CMD) tools/bdfmerge
MKBOLD	= $(PERL_CMD) tools/mkbold -V
MKITALIC= $(PERL_CMD) tools/mkitalic -V
ADJUST	= $(PERL_CMD) tools/adjust
MKISO8859= $(SED_CMD) 's/@@REGISTRY@@/ISO8859/g;s/@@ENCODING@@/1/g;s/@@CHARS@@/191/g;'
MKJISX0201= $(SED_CMD) 's/@@REGISTRY@@/JISX0201.1976/g;s/@@ENCODING@@/0/g;s/@@CHARS@@/159/g;'

BDF =	mona6x12a mona6x12aB mona6x12aI mona6x12aBI \
	mona6x12r mona6x12rB mona6x12rI mona6x12rBI \
	mona7x14a mona7x14aB mona7x14aI mona7x14aBI \
	mona7x14r mona7x14rB mona7x14rI mona7x14rBI \
	mona8x16a mona8x16aB mona8x16aI mona8x16aBI \
	mona8x16r mona8x16rB mona8x16rI mona8x16rBI \
	monak12 monak12B monak12I monak12BI \
	monak14 monak14B monak14I monak14BI \
	monak16 monak16B monak16I monak16BI

## Dependencies

bdf:	bdf-normal bdf-bold bdf-italic bdf-bold-italic

bdf-normal:	dist/mona6x12a.bdf dist/mona6x12r.bdf \
		dist/mona7x14a.bdf dist/mona7x14r.bdf \
		dist/mona8x16a.bdf dist/mona8x16r.bdf \
		dist/monak12.bdf \
		dist/monak14.bdf \
		dist/monak16.bdf
bdf-bold:	dist/mona6x12aB.bdf dist/mona6x12rB.bdf \
		dist/mona7x14aB.bdf dist/mona7x14rB.bdf \
		dist/mona8x16aB.bdf dist/mona8x16rB.bdf \
		dist/monak12B.bdf \
		dist/monak14B.bdf \
		dist/monak16B.bdf
bdf-italic:	dist/mona6x12aI.bdf dist/mona6x12rI.bdf \
		dist/mona7x14aI.bdf dist/mona7x14rI.bdf \
		dist/mona8x16aI.bdf dist/mona8x16rI.bdf \
		dist/monak12I.bdf \
		dist/monak14I.bdf \
		dist/monak16I.bdf
bdf-bold-italic:dist/mona6x12aBI.bdf dist/mona6x12rBI.bdf \
		dist/mona7x14aBI.bdf dist/mona7x14rBI.bdf \
		dist/mona8x16aBI.bdf dist/mona8x16rBI.bdf \
		dist/monak12BI.bdf \
		dist/monak14BI.bdf \
		dist/monak16BI.bdf

# primary bitmaps

dist/mona6x12a.bdf: src/mona6x12.bit0 src/mona6x12a.bit1
	$(MKISO8859) src/mona6x12.bit0 src/mona6x12a.bit1 | \
		$(BIT2BDF) > dist/mona6x12a.bdf
dist/mona6x12r.bdf: src/mona6x12.bit0 src/mona6x12r.bit1
	$(MKJISX0201) src/mona6x12.bit0 src/mona6x12r.bit1 | \
		$(BIT2BDF) > dist/mona6x12r.bdf
dist/mona7x14a.bdf: src/mona7x14.bit0 src/mona7x14a.bit1
	$(MKISO8859) src/mona7x14.bit0 src/mona7x14a.bit1 | \
		$(BIT2BDF) > dist/mona7x14a.bdf
dist/mona7x14r.bdf: src/mona7x14.bit0 src/mona7x14r.bit1
	$(MKJISX0201) src/mona7x14.bit0 src/mona7x14r.bit1 | \
		$(BIT2BDF) > dist/mona7x14r.bdf
dist/mona8x16a.bdf: src/mona8x16.bit0 src/mona8x16a.bit1
	$(MKISO8859) src/mona8x16.bit0 src/mona8x16a.bit1 | \
		$(BIT2BDF) > dist/mona8x16a.bdf
dist/mona8x16r.bdf: src/mona8x16.bit0 src/mona8x16r.bit1
	$(MKJISX0201) src/mona8x16.bit0 src/mona8x16r.bit1 | \
		$(BIT2BDF) > dist/mona8x16r.bdf
dist/monak12.bdf: src/monak12-base.bit src/monak12-ext.bit
	$(BDFMERGE) src/monak12-base.bit src/monak12-ext.bit | \
		$(BIT2BDF) > dist/monak12.bdf
dist/monak14.bdf: src/monak14-base.bit src/monak14-ext.bit
	$(BDFMERGE) src/monak14-base.bit src/monak14-ext.bit | \
		$(BIT2BDF) > dist/monak14.bdf
dist/monak16.bdf: src/monak16-base.bit src/monak16-ext.bit
	$(BDFMERGE) src/monak16-base.bit src/monak16-ext.bit | \
		$(BIT2BDF) > dist/monak16.bdf

# modified bitmaps

dist/mona6x12aB.bdf: dist/mona6x12a.bdf
	$(MKBOLD) dist/mona6x12a.bdf > dist/mona6x12aB.bdf
dist/mona6x12rB.bdf: dist/mona6x12r.bdf
	$(MKBOLD) dist/mona6x12r.bdf > dist/mona6x12rB.bdf
dist/mona6x12aI.bdf: dist/mona6x12a.bdf
	$(MKITALIC) dist/mona6x12a.bdf > dist/mona6x12aI.bdf
dist/mona6x12rI.bdf: dist/mona6x12r.bdf
	$(MKITALIC) dist/mona6x12r.bdf > dist/mona6x12rI.bdf
dist/mona6x12aBI.bdf: dist/mona6x12aI.bdf
	$(MKBOLD) dist/mona6x12aI.bdf > dist/mona6x12aBI.bdf
dist/mona6x12rBI.bdf: dist/mona6x12rI.bdf
	$(MKBOLD) dist/mona6x12rI.bdf > dist/mona6x12rBI.bdf

dist/mona7x14aB.bdf: dist/mona7x14a.bdf
	$(MKBOLD) dist/mona7x14a.bdf > dist/mona7x14aB.bdf
dist/mona7x14rB.bdf: dist/mona7x14r.bdf
	$(MKBOLD) dist/mona7x14r.bdf > dist/mona7x14rB.bdf
dist/mona7x14aI.bdf: dist/mona7x14a.bdf
	$(MKITALIC) dist/mona7x14a.bdf > dist/mona7x14aI.bdf
dist/mona7x14rI.bdf: dist/mona7x14r.bdf
	$(MKITALIC) dist/mona7x14r.bdf > dist/mona7x14rI.bdf
dist/mona7x14aBI.bdf: dist/mona7x14aI.bdf
	$(MKBOLD) dist/mona7x14aI.bdf > dist/mona7x14aBI.bdf
dist/mona7x14rBI.bdf: dist/mona7x14rI.bdf
	$(MKBOLD) dist/mona7x14rI.bdf > dist/mona7x14rBI.bdf

dist/mona8x16aB.bdf: dist/mona8x16a.bdf
	$(MKBOLD) dist/mona8x16a.bdf > dist/mona8x16aB.bdf
dist/mona8x16rB.bdf: dist/mona8x16r.bdf
	$(MKBOLD) dist/mona8x16r.bdf > dist/mona8x16rB.bdf
dist/mona8x16aI.bdf: dist/mona8x16a.bdf
	$(MKITALIC) dist/mona8x16a.bdf > dist/mona8x16aI.bdf
dist/mona8x16rI.bdf: dist/mona8x16r.bdf
	$(MKITALIC) dist/mona8x16r.bdf > dist/mona8x16rI.bdf
dist/mona8x16aBI.bdf: dist/mona8x16aI.bdf
	$(MKBOLD) dist/mona8x16aI.bdf > dist/mona8x16aBI.bdf
dist/mona8x16rBI.bdf: dist/mona8x16rI.bdf
	$(MKBOLD) dist/mona8x16rI.bdf > dist/mona8x16rBI.bdf

dist/monak12B.bdf: dist/monak12.bdf
	$(MKBOLD) dist/monak12.bdf > dist/monak12B.bdf
dist/monak12I.bdf: dist/monak12.bdf
	$(MKITALIC) dist/monak12.bdf > dist/monak12I.bdf
dist/monak12BI.bdf: dist/monak12I.bdf
	$(MKBOLD) dist/monak12I.bdf > dist/monak12BI.bdf

dist/monak14B.bdf: dist/monak14.bdf
	$(MKBOLD) dist/monak14.bdf > dist/monak14B.bdf
dist/monak14I.bdf: dist/monak14.bdf
	$(MKITALIC) dist/monak14.bdf > dist/monak14I.bdf
dist/monak14BI.bdf: dist/monak14I.bdf
	$(MKBOLD) dist/monak14I.bdf > dist/monak14BI.bdf

dist/monak16B.bdf: dist/monak16.bdf
	$(MKBOLD) dist/monak16.bdf > dist/monak16B.bdf
dist/monak16I.bdf: dist/monak16.bdf
	$(MKITALIC) dist/monak16.bdf > dist/monak16I.bdf
dist/monak16BI.bdf: dist/monak16I.bdf
	$(MKBOLD) dist/monak16I.bdf > dist/monak16BI.bdf


##  Utilities

# clean
clean:
	-rm dist/*.bdf dist/fonts.dir
ttfclean:
	cd ttfsrc; make clean

# packing
pack: clean ttfclean
	cd ..; tar c --numeric-owner --bzip2 -f monafonts-$(VERSION).tar.bz2.bin monafonts-$(VERSION)

# test
test12:	dist/mona6x12r.bdf dist/mona6x12a.bdf dist/monak12.bdf testrun
test14:	dist/mona7x14r.bdf dist/mona7x14a.bdf dist/monak14.bdf testrun
test16:	dist/mona8x16r.bdf dist/mona8x16a.bdf dist/monak16.bdf testrun
testrun:
	$(MKFONTDIR) `pwd`/dist
	xset -fp `pwd`/dist; xset +fp `pwd`/dist; xset fp rehash
	#xedit -xrm '*font:-mona*12*jisx0201.1976-0' test.html
	#xfontsel -pattern '-mona*'
	netscape tools/test.html

# install
install: bdf
	if [ ! -d $(X11FONTDIR) ]; then \
		$(MKDIRHIER) $(X11FONTDIR); \
	fi
	for i in $(BDF); do \
		$(BDFTOPCF) dist/$$i.bdf | \
		$(GZIP_CMD) -c > $(X11FONTDIR)/$$i.pcf.$(GZIP_SUFFIX); \
	done
	$(MKFONTDIR) $(X11FONTDIR)

# append fonts.alias
install-alias:
	cat fonts.alias.mona >> $(X11FONTDIR)/fonts.alias