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