File: Makefile

package info (click to toggle)
bedstead 3.252-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 560 kB
  • sloc: ansic: 4,373; python: 337; makefile: 133; sh: 71
file content (134 lines) | stat: -rw-r--r-- 4,157 bytes parent folder | download | duplicates (2)
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
# SPDX-License-Identifier: CC0-1.0

FONTBASES = bedstead bedstead-extended bedstead-semicondensed \
            bedstead-condensed bedstead-extracondensed \
            bedstead-ultracondensed \
            bedstead-bold bedstead-boldextended bedstead-boldsemicondensed \
            bedstead-boldcondensed bedstead-boldextracondensed \
            bedstead-boldultracondensed

TTXFILES = $(addsuffix .ttx, $(FONTBASES))
OTFFILES = $(addsuffix .otf, $(FONTBASES))

DISTFILES = bedstead.c Makefile CONTRIBUTING COPYING HACKING NEWS \
	df.ps rom.ps Fontmap \
	$(OTFFILES) \
	bedstead-10.bdf bedstead-20.bdf bedstead-bold-20.bdf \
	bedstead-10-df.png bedstead-20-df.png \
	bedstead-complement.pdf

all: $(DISTFILES)

.PHONY: all-web
all-web: all sample.png extended.png icon-16.png icon-32.png icon-64.png

.PHONY: experimental
experimental: bedstead-chiseltip.otf bedstead-plotter-thin.otf \
 bedstead-plotter-light.otf bedstead-plotter-medium.otf \
 bedstead-plotter-bold.otf plotter.png

# CWARNFLAGS contains a set of GCC/Clang warning flags under which
# bedstead.c is clean.  The "glyphs" array makes heavy use of the
# shortcuts disapproved by -Wmissing-field-initializers and
# -Wmissing-braces, so those are disabled.
CWARNFLAGS ?= -Wall -Wextra \
	-Wno-missing-field-initializers -Wno-missing-braces
CFLAGS += $(CWARNFLAGS)

bedstead.ttx: bedstead
	./bedstead > bedstead.ttx

bedstead-extended.ttx: bedstead
	./bedstead --extended > bedstead-extended.ttx

bedstead-semicondensed.ttx: bedstead
	./bedstead --semi-condensed > bedstead-semicondensed.ttx

bedstead-condensed.ttx: bedstead
	./bedstead --condensed > bedstead-condensed.ttx

bedstead-extracondensed.ttx: bedstead
	./bedstead --extra-condensed > bedstead-extracondensed.ttx

bedstead-ultracondensed.ttx: bedstead
	./bedstead --ultra-condensed > bedstead-ultracondensed.ttx

bedstead-bold.ttx: bedstead
	./bedstead --bold > bedstead-bold.ttx

bedstead-boldextended.ttx: bedstead
	./bedstead --bold --extended > bedstead-boldextended.ttx

bedstead-boldsemicondensed.ttx: bedstead
	./bedstead --bold --semi-condensed > bedstead-boldsemicondensed.ttx

bedstead-boldcondensed.ttx: bedstead
	./bedstead --bold --condensed > bedstead-boldcondensed.ttx

bedstead-boldextracondensed.ttx: bedstead
	./bedstead --bold --extra-condensed > bedstead-boldextracondensed.ttx

bedstead-boldultracondensed.ttx: bedstead
	./bedstead --bold --ultra-condensed > bedstead-boldultracondensed.ttx

bedstead-oc.ttx: bedstead
	./bedstead --plotter > bedstead-oc.ttx

bedstead-plotter-%.ttx: strokefont.py bedstead-oc.ttx
	fontforge -lang=py -script strokefont.py plotter-$* bedstead-oc.ttx \
		bedstead-plotter-$*.ttx

bedstead-chiseltip.ttx: strokefont.py bedstead-oc.ttx
	fontforge -lang=py -script strokefont.py chiseltip bedstead-oc.ttx \
		bedstead-chiseltip.ttx

bedstead-%.bdf.ps: bedstead
	./bedstead --bdfgen $* > $@

bedstead-bold-%.bdf.ps: bedstead
	./bedstead --bold --bdfgen $* > $@

# Dependency of all of OTFFILES could be narrowed to just the relevant
# one.
%.bdf: %.bdf.ps $(OTFFILES) Fontmap
	gs -P -q -dNOSAFER -dNODISPLAY -dBATCH -- $< $@

%.otf: %.ttx
	ttx --no-recalc-timestamp -o $@ $<

%.png: %.ps $(OTFFILES) Fontmap
	gs -P -q -dSAFER -sDEVICE=png16m -dTextAlphaBits=4 -o $@ $<

icon-%.png: icon.ps bedstead-extended.otf Fontmap
	gs -P -q -dSAFER -dsize=$* -sDEVICE=png16m -dTextAlphaBits=4 -o $@ $<

bedstead-%-df.png: df.ps bedstead.otf Fontmap
	gs -P -q -dSAFER -dsize=$* -sDEVICE=png16m -o $@ $<

bedstead-complement.ps: bedstead
	./bedstead --complement > bedstead-complement.ps

bedstead-complement.pdf: bedstead-complement.ps bedstead.otf Fontmap
	ps2pdf -P $< $@

.PHONY: clean
clean:
	rm -f bedstead *.ttx *.otf *.bdf *.bdf.ps *.png *.pdf \
		bedstead-complement.ps

.PHONY: install-user
install-user: $(OTFFILES)
	install -d "$${HOME}"/.fonts
	install -m 644 $(OTFFILES) "$${HOME}"/.fonts

VERSION != sed -n 's/^\#define VERSION "\(.*\)"/\1/p' < bedstead.c

.PHONY: dist
dist: $(DISTFILES)
	rm -rf bedstead-$(VERSION)
	mkdir bedstead-$(VERSION)
	ln $(DISTFILES) bedstead-$(VERSION)
	zip -r bedstead-$(VERSION).zip  bedstead-$(VERSION)
	rm -r bedstead-$(VERSION)

.DELETE_ON_ERROR: