• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Installation directories.
2LINGUAS ?= ru
3PREFIX ?= /usr
4MANDIR ?=  $(PREFIX)/share/man
5MAN3SUBDIR ?= man3
6MAN8SUBDIR ?= man8
7MAN3DIR ?= $(MANDIR)/$(MAN3SUBDIR)
8MAN8DIR ?= $(MANDIR)/$(MAN8SUBDIR)
9
10all:
11
12install: all
13	mkdir -p $(DESTDIR)$(MAN3DIR)
14	mkdir -p $(DESTDIR)$(MAN8DIR)
15	install -m 644 man3/*.3 $(DESTDIR)$(MAN3DIR)
16	install -m 644 man8/*.8 $(DESTDIR)$(MAN8DIR)
17	for lang in $(LINGUAS) ; do \
18		if [ -e $${lang}/man3 ] ; then \
19			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/$(MAN3SUBDIR) ; \
20			install -m 644 $${lang}/man3/*.3 $(DESTDIR)$(MANDIR)/$${lang}/$(MAN3SUBDIR) ; \
21		fi ; \
22		if [ -e $${lang}/man8 ] ; then \
23			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/$(MAN8SUBDIR) ; \
24			install -m 644 $${lang}/man8/*.8 $(DESTDIR)$(MANDIR)/$${lang}/$(MAN8SUBDIR) ; \
25		fi ; \
26	done
27