#!/bin/sh# Test one of the main kernel Makefile targets to generate a perf sources tarball# suitable for build outside the full kernel sources.## This is to test that the tools/perf/MANIFEST file lists all the files needed to# be in such tarball, which sometimes gets broken when we move files around,# like when we made some files that were in tools/perf/ available to other tools/# codebases by moving it to tools/include/, etc.PERF=$1cd${PERF}/../..make perf-targz-src-pkg > /dev/nullTARBALL=$(ls-rt perf-*.tar.gz)TMP_DEST=$(mktemp-d)tar xf ${TARBALL}-C$TMP_DESTrm-f${TARBALL}cd - > /dev/nullmake -C$TMP_DEST/perf*/tools/perf > /dev/null 2>&1RC=$?rm-rf${TMP_DEST}exit$RC