Back to home page

LXR

 
 

    


0001 #!/bin/sh
0002 # Run headers_$1 command for all suitable architectures
0003 
0004 # Stop on error
0005 set -e
0006 
0007 do_command()
0008 {
0009         if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
0010                 make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
0011         else
0012                 printf "Ignoring arch: %s\n" ${arch}
0013         fi
0014 }
0015 
0016 archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}
0017 
0018 for arch in ${archs}; do
0019         case ${arch} in
0020         um)        # no userspace export
0021                 ;;
0022         *)
0023                 if [ -d ${srctree}/arch/${arch} ]; then
0024                         do_command $1 ${arch}
0025                 fi
0026                 ;;
0027         esac
0028 done