Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Allow skipping docs compilation

Currently rst2man is required to build bpf selftests, as the tool is
used by Makefile.docs. rst2man may be missing in some build
environments and is not essential for selftests. It makes sense to
allow user to skip building docs.

This patch adds SKIP_DOCS variable into bpf selftests Makefile that when
set to 1 allows skipping building docs, for example:
make -C tools/testing/selftests TARGETS=bpf SKIP_DOCS=1

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250510002450.365613-1-mykyta.yatsenko5@gmail.com

authored by

Mykyta Yatsenko and committed by
Andrii Nakryiko
3a320ed3 149e0cf4

+2
+2
tools/testing/selftests/bpf/Makefile
··· 358 358 prefix= DESTDIR=$(SCRATCH_DIR)/ install-bin 359 359 endif 360 360 361 + ifneq ($(SKIP_DOCS),1) 361 362 all: docs 363 + endif 362 364 363 365 docs: 364 366 $(Q)RST2MAN_OPTS="--exit-status=1" $(MAKE) $(submake_extras) \