#!/bin/sh # Run headers_$1 command for all suitable architectures # Stop on error set -e proc do_command { if test -f $(srctree)/arch/$2/include/asm/Kbuild { make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 } else { printf "Ignoring arch: %s\n" $(arch) } } setglobal archs = $(HDR_ARCH_LIST:-$(ls ${srctree}/arch)) for arch in [$(archs)] { match $(arch) { with um # no userspace export with * if test -d $(srctree)/arch/$(arch) { do_command $1 $(arch) } } }