chiark / gitweb /
Makefile: Make sure the `rules' directory exists.
[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 all:
13         mkdir -p rules/
14         ./mkrules <specs
15         cp manual/*.rules rules/
16
17 install:
18         perl -pe 's#^(our \$$prefix=").*("\;\s*)$$#$$1$(prefix)$$2#' \
19                 <$(utility) >$(utility).sedded
20         $(install) -m755 -d $(DESTDIR)$(prefix)/{bin,share/{man/man8,$(package)/rules}}
21         $(install) -m755 $(utility).sedded $(DESTDIR)$(prefix)/bin/$(utility)
22         $(install) -m755 $(utility).8 $(DESTDIR)$(prefix)/share/man/man8/.
23         $(install) -m644 rules/* $(DESTDIR)$(prefix)/share/$(package)/rules/
24
25 clean:
26         rm -f rules/*.rules rules/foundries rules/foundries.new
27         rm -f good/*.bdf bad/*.bdf
28         rm -f *~ $(utility).sedded