unifont-6.3.20131215.tar.gz
[unifont.git] / man / Makefile
1
2 SHELL = /bin/sh
3
4 MAN1PAGES = bdfimplode.1 hex2bdf.1 hex2sfd.1 \
5         hexbraille.1 hexdraw.1 hexmerge.1 johab2ucs2.1 \
6         unibdf2hex.1 unibmp2hex.1 unicoverage.1 unidup.1 \
7         unifontpic.1 unifontchojung.1 unifontksx.1 unigencircles.1 \
8         unigenwidth.1 unihex2bmp.1 unihex2png.1 unihexgen.1 \
9         unipagecount.1 unipng2hex.1
10
11 MAN5PAGES = unifont.5
12
13 #
14 # $(PREFIX) is defined in the top-level Makefile or on the command line
15 # to override the setting below.
16 #
17 PREFIX = /usr
18 INSTALLDIR = $(PREFIX)/share/man
19
20 #
21 # Set "COMPRESS = 0" to install uncompressed man pages (the default), or
22 # override on the command line.
23 #
24 # Set "COMPRESS = 1" or anything else non-zero to install gzipped man pages.
25 #
26 COMPRESS = 1
27
28 all:
29
30 install: $(MANPAGES)
31         install -m0755 -d $(INSTALLDIR)
32         install -m0755 -d $(INSTALLDIR)/man1
33         install -m0755 -d $(INSTALLDIR)/man5
34         for i in $(MAN1PAGES) ; do \
35            if [ $(COMPRESS) = 0 ] ; then \
36               install -m0644 $(MAN1PAGES) $(INSTALLDIR)/man1 ; \
37            else \
38               gzip -f -9 < $$i >$$i.gz ; \
39               chmod 644 $$i.gz ; \
40               mv $$i.gz $(INSTALLDIR)/man1 ; \
41            fi \
42         done
43         for i in $(MAN5PAGES) ; do \
44            if [ $(COMPRESS) = 0 ] ; then \
45               install -m0644 $(MAN5PAGES) $(INSTALLDIR)/man5 ; \
46            else \
47               gzip -f -9 < $$i >$$i.gz ; \
48               chmod 644 $$i.gz ; \
49               mv $$i.gz $(INSTALLDIR)/man5 ; \
50            fi \
51         done
52
53 clean:
54         \rm -f *~
55
56 distclean: clean
57
58 .PHONY: all install clean distclean