1 #!/bin/bash 1 #!/bin/bash 2 # SPDX-License-Identifier: (GPL-2.0-only OR BS 2 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 set -e 3 set -e 4 4 5 # Assume script is located under tools/testing 5 # Assume script is located under tools/testing/selftests/bpf/. We want to start 6 # build attempts from the top of kernel reposi 6 # build attempts from the top of kernel repository. 7 SCRIPT_REL_PATH=$(realpath $0) 7 SCRIPT_REL_PATH=$(realpath $0) 8 SCRIPT_REL_DIR=$(dirname $SCRIPT_REL_PATH) 8 SCRIPT_REL_DIR=$(dirname $SCRIPT_REL_PATH) 9 KDIR_ROOT_DIR=$(realpath $SCRIPT_REL_DIR/../.. 9 KDIR_ROOT_DIR=$(realpath $SCRIPT_REL_DIR/../../../../) 10 SCRIPT_REL_DIR=$(dirname $(realpath --relative 10 SCRIPT_REL_DIR=$(dirname $(realpath --relative-to=$KDIR_ROOT_DIR $SCRIPT_REL_PATH)) 11 cd $KDIR_ROOT_DIR 11 cd $KDIR_ROOT_DIR 12 12 13 if [ ! -e $PWD/$SCRIPT_REL_DIR/Makefile ]; the 13 if [ ! -e $PWD/$SCRIPT_REL_DIR/Makefile ]; then 14 echo -e "skip: bpftool files not fo 14 echo -e "skip: bpftool files not found!\n" 15 exit 4 # KSFT_SKIP=4 15 exit 4 # KSFT_SKIP=4 16 fi 16 fi 17 17 18 for tgt in docs docs-clean; do 18 for tgt in docs docs-clean; do 19 make -s -C $PWD/$SCRIPT_REL_DIR $tgt; 19 make -s -C $PWD/$SCRIPT_REL_DIR $tgt; 20 done 20 done
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.