1# 2# Makefile for libcap documentation 3# 4 5topdir=$(shell pwd)/.. 6include $(topdir)/Make.Rules 7 8MAN1S = capsh.1 9MAN3S = cap_init.3 cap_free.3 cap_dup.3 \ 10 cap_clear.3 cap_clear_flag.3 cap_get_flag.3 cap_set_flag.3 \ 11 cap_compare.3 cap_get_proc.3 cap_get_pid.3 cap_set_proc.3 \ 12 cap_get_file.3 cap_get_fd.3 cap_set_file.3 cap_set_fd.3 \ 13 cap_copy_ext.3 cap_size.3 cap_copy_int.3 \ 14 cap_from_text.3 cap_to_text.3 cap_from_name.3 cap_to_name.3 \ 15 capsetp.3 capgetp.3 libcap.3 \ 16 cap_get_bound.3 cap_drop_bound.3 \ 17 cap_get_mode.3 cap_set_mode.3 cap_mode_name.3 \ 18 cap_get_secbits.3 cap_set_secbits.3 \ 19 cap_setuid.3 cap_setgroups.3 \ 20 psx_syscall.3 psx_syscall3.3 psx_syscall6.3 libpsx.3 21MAN8S = getcap.8 setcap.8 getpcaps.8 22 23MANS = $(MAN1S) $(MAN3S) $(MAN8S) 24 25all: $(MANS) 26 27.PHONY: html 28html: 29 mkdir -p html 30 for man in $(MANS) ; \ 31 do \ 32 egrep '^\.so man' $$man > /dev/null || \ 33 groff -man -Thtml $$man > html/$$man.html ; \ 34 done 35 36install: 37 mkdir -p -m 755 $(FAKEROOT)$(MANDIR)/man1 $(FAKEROOT)$(MANDIR)/man3 $(FAKEROOT)$(MANDIR)/man8 38 for man in \ 39 $(FAKEROOT)$(MANDIR)/man1 $(MAN1S) \ 40 $(FAKEROOT)$(MANDIR)/man3 $(MAN3S) \ 41 $(FAKEROOT)$(MANDIR)/man8 $(MAN8S) \ 42 ; \ 43 do \ 44 case $$man in \ 45 /*) sub=$$man ; continue ;; \ 46 esac; \ 47 install -m 644 $$man $$sub ; \ 48 done 49 50clean: 51 $(LOCALCLEAN) 52 rm -rf html 53