Lines Matching +full:man +full:- +full:pages
1 # SPDX-License-Identifier: GPL-2.0-only
7 RM ?= rm -f
8 RMDIR ?= rmdir --ignore-fail-on-non-empty
17 mandir ?= $(prefix)/man
21 SYSCALL_RST = bpf-syscall.rst
24 HELPERS_RST = bpf-helpers.rst
41 RST2MAN_DEP := $(shell command -v rst2man 2>/dev/null)
43 # Configure make rules for the man page bpf-$1.$2.
44 # $1 - target for scripts/bpf_doc.py
45 # $2 - man page section to generate the troff file
47 $(OUTPUT)bpf-$1.rst: ../../../../include/uapi/linux/bpf.h
49 --filename $$< > $$@
53 $$(error "rst2man not found, but required to generate man pages")
55 $$(QUIET_GEN)rst2man --exit-status=1 $$< > $$@.tmp
58 docs-clean-$1:
59 $$(call QUIET_CLEAN, eBPF_$1-manpage)
60 $(Q)$(RM) $$(DOC_MAN$2) $(OUTPUT)bpf-$1.rst
62 docs-install-$1: docs
63 $$(call QUIET_INSTALL, eBPF_$1-manpage)
64 $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$$(man$2dir)
65 $(Q)$(INSTALL) -m 644 $$(DOC_MAN$2) $(DESTDIR)$$(man$2dir)
67 docs-uninstall-$1:
68 $$(call QUIET_UNINST, eBPF_$1-manpage)
69 $(Q)$(RM) $$(addprefix $(DESTDIR)$$(man$2dir)/,$$(_DOC_MAN$2))
70 $(Q)$(RMDIR) $(DESTDIR)$$(man$2dir)
72 .PHONY: $1 docs-clean-$1 docs-install-$1 docs-uninstall-$1
75 # Create the make targets to generate manual pages by name and section
79 docs-clean: $(foreach doctarget,$(DOCTARGETS), docs-clean-$(doctarget))
80 docs-install: $(foreach doctarget,$(DOCTARGETS), docs-install-$(doctarget))
81 docs-uninstall: $(foreach doctarget,$(DOCTARGETS), docs-uninstall-$(doctarget))
83 .PHONY: docs docs-clean docs-install docs-uninstall man2 man7