#!/bin/sh1# Run headers_$1 command for all suitable architectures23# Stop on error4set -e56do_command()7{8if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then9make ARCH=$2 KBUILD_HEADERS=$1 headers_$110else11printf "Ignoring arch: %s\n" ${arch}12fi13}1415archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}1617for arch in ${archs}; do18case ${arch} in19um) # no userspace export20;;21cris) # headers export are known broken22;;23*)24if [ -d ${srctree}/arch/${arch} ]; then25do_command $1 ${arch}26fi27;;28esac29done3031323334