Home | History | Annotate | Download | only in doc
      1 #
      2 # Makefile for libcap documentation
      3 #
      4 
      5 topdir=$(shell pwd)/..
      6 include $(topdir)/Make.Rules
      7 
      8 MAN1S = capsh.1
      9 MAN3S = 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 MAN8S = getcap.8 setcap.8
     18 
     19 MANS = $(MAN1S) $(MAN3S) $(MAN8S)
     20 
     21 all: $(MANS)
     22 
     23 .PHONY: html
     24 html:
     25 	mkdir -p html
     26 	for man in $(MANS) ; \
     27 	do \
     28 		egrep '^\.so man' $$man > /dev/null || \
     29 		groff -man -Thtml $$man > html/$$man.html ; \
     30 	done
     31 
     32 install:
     33 	mkdir -p -m 755 $(FAKEROOT)$(MANDIR)/man1 $(FAKEROOT)$(MANDIR)/man3 $(FAKEROOT)$(MANDIR)/man8
     34 	for man in \
     35 		$(FAKEROOT)$(MANDIR)/man1 $(MAN1S) \
     36 		$(FAKEROOT)$(MANDIR)/man3 $(MAN3S) \
     37 		$(FAKEROOT)$(MANDIR)/man8 $(MAN8S) \
     38 		; \
     39 	do \
     40 		case $$man in \
     41 		/*)	sub=$$man ; continue ;; \
     42 		esac; \
     43 		install -m 644 $$man $$sub ; \
     44 	done
     45 
     46 clean:
     47 	$(LOCALCLEAN)
     48 	rm -rf html
     49 
     50 
     51