Skip to content

Commit

Permalink
selftests/bpf: Add docs target as all dependency
Browse files Browse the repository at this point in the history
Currently docs target is make dependency for TEST_GEN_FILES,
which makes tests to be rebuilt every time you run make.

Adding docs as all target dependency, so when running make
on top of built selftests it will show just:

  $ make
  make[1]: Nothing to be done for 'docs'.

After cleaning docs, only docs is rebuilt:

  $ make docs-clean
  CLEAN    eBPF_helpers-manpage
  CLEAN    eBPF_syscall-manpage
  $ make
  GEN      ...selftests/bpf/bpf-helpers.rst
  GEN      ...selftests/bpf/bpf-helpers.7
  GEN      ...selftests/bpf/bpf-syscall.rst
  GEN      ...selftests/bpf/bpf-syscall.2
  $ make
  make[1]: Nothing to be done for 'docs'.

Fixes: a01d935 ("tools/bpf: Remove bpf-helpers from bpftool docs")
Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
olsajiri authored and anakryiko committed Apr 20, 2021
1 parent 69443c4 commit d044d9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ $(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL)
cp $(SCRATCH_DIR)/runqslower $@

$(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(BPFOBJ)
$(TEST_GEN_FILES): docs

$(OUTPUT)/test_dev_cgroup: cgroup_helpers.c
$(OUTPUT)/test_skb_cgroup_id_user: cgroup_helpers.c
Expand All @@ -210,6 +209,8 @@ $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) \
OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \
prefix= DESTDIR=$(HOST_SCRATCH_DIR)/ install

all: docs

docs:
$(Q)RST2MAN_OPTS="--exit-status=1" $(MAKE) $(submake_extras) \
-f Makefile.docs \
Expand Down

0 comments on commit d044d9f

Please sign in to comment.