chiark / gitweb /
exactly as found in #660965 message 34
[xfonts-traditional.git] / Makefile
1 SHELL=/bin/bash
2
3 prefix?=/usr/local
4
5 package=xfonts-traditional
6 utility=update-$(package)
7
8 install=install -o 0 -g 0
9
10 default: all
11
12 OWNFONT = 6x13O
13 SRCBDF = $(patsubst %, bdfsrc/%.bdf, $(OWNFONT))
14 GENPCF = $(patsubst %, good/%.pcf.gz, $(OWNFONT))
15 $(GENPCF): good/%.pcf.gz: bdfsrc/%.bdf
16         bdftopcf <$< | gzip -9 >$@
17
18 all: $(GENPCF)
19         mkdir -p rules/
20         ./mkrules <specs
21         cp manual/*.rules rules/
22
23 install:
24         perl -pe 's#^(our \$$prefix=").*("\;\s*)$$#$$1$(prefix)$$2#' \
25                 <$(utility) >$(utility).sedded
26         $(install) -m755 -d $(DESTDIR)$(prefix)/{bin,share/{man/man8,$(package)/rules}}
27         $(install) -m755 $(utility).sedded $(DESTDIR)$(prefix)/bin/$(utility)
28         $(install) -m755 $(utility).8 $(DESTDIR)$(prefix)/share/man/man8/.
29         $(install) -m644 rules/* $(DESTDIR)$(prefix)/share/$(package)/rules/
30
31 clean:
32         rm -f rules/*.rules rules/foundries rules/foundries.new
33         rm -f good/*.bdf bad/*.bdf
34         rm -f $(GENPCF)
35         rm -f *~ $(utility).sedded