xref: /linux/tools/testing/selftests/bpf/test_doc_build.sh (revision ac8fa1bdc02671ff9c3e548878e68886b3f5daee)
1#!/bin/bash
2# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3set -e
4
5# Assume script is located under tools/testing/selftests/bpf/. We want to start
6# build attempts from the top of kernel repository.
7SCRIPT_REL_PATH=$(realpath --relative-to=$PWD $0)
8SCRIPT_REL_DIR=$(dirname $SCRIPT_REL_PATH)
9KDIR_ROOT_DIR=$(realpath $PWD/$SCRIPT_REL_DIR/../../../../)
10cd $KDIR_ROOT_DIR
11
12for tgt in docs docs-clean; do
13	make -s -C $PWD/$SCRIPT_REL_DIR $tgt;
14done
15