aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2018-02-07 23:27:14 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2018-02-08 05:59:50 -0500
commit92426820f7616caebdf6ba665f749102a670b3d4 (patch)
tree572bcc5f3d885cc4917d2baf80f76877a4e6fb60 /tools
parent0badd331491097cc3702d05a6dd0264a434712b2 (diff)
tools: bpftool: exit doc Makefile early if rst2man is not available
If rst2man is not available on the system, running `make doc` from the bpftool directory fails with an error message. However, it creates empty manual pages (.8 files in this case). A subsequent call to `make doc-install` would then succeed and install those empty man pages on the system. To prevent this, raise a Makefile error and exit immediately if rst2man is not available before generating the pages from the rst documentation. Fixes: ff69c21a85a4 ("tools: bpftool: add documentation") Reported-by: Jason van Aaardt <jason.vanaardt@netronome.com> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/bpf/bpftool/Documentation/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/Documentation/Makefile b/tools/bpf/bpftool/Documentation/Makefile
index c462a928e03d..a9d47c1558bb 100644
--- a/tools/bpf/bpftool/Documentation/Makefile
+++ b/tools/bpf/bpftool/Documentation/Makefile
@@ -23,7 +23,12 @@ DOC_MAN8 = $(addprefix $(OUTPUT),$(_DOC_MAN8))
23man: man8 23man: man8
24man8: $(DOC_MAN8) 24man8: $(DOC_MAN8)
25 25
26RST2MAN_DEP := $(shell command -v rst2man 2>/dev/null)
27
26$(OUTPUT)%.8: %.rst 28$(OUTPUT)%.8: %.rst
29ifndef RST2MAN_DEP
30 $(error "rst2man not found, but required to generate man pages")
31endif
27 $(QUIET_GEN)rst2man $< > $@ 32 $(QUIET_GEN)rst2man $< > $@
28 33
29clean: 34clean: