android_kernel_xiaomi_sm8350/scripts/headers.sh
Amerigo Wang cefdff4b4d kbuild: clean up scripts/headers.sh
'drop' variable is unused.

'ppc' and 'sparc64' directories don't exist in arch/,
and I think their headers can be well exported now, so
just remove them.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09 22:37:43 +02:00

35 lines
608 B
Bash
Executable File

#!/bin/sh
# Run headers_$1 command for all suitable architectures
# Stop on error
set -e
do_command()
{
if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
elif [ -f ${srctree}/include/asm-$2/Kbuild ]; then
make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
else
printf "Ignoring arch: %s\n" ${arch}
fi
}
archs=$(ls ${srctree}/arch)
for arch in ${archs}; do
case ${arch} in
um) # no userspace export
;;
cris) # headers export are known broken
;;
*)
if [ -d ${srctree}/arch/${arch} ]; then
do_command $1 ${arch}
fi
;;
esac
done