blob: d4dc4de5cea1f9134d810d2bdc3614187187571d [file] [log] [blame]
Sam Ravnborg2fb9b1b2008-06-21 00:24:17 +02001#!/bin/sh
2# Run headers_$1 command for all suitable architectures
3
4# Stop on error
5set -e
6
7do_command()
8{
9 if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
10 make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
Sam Ravnborg2fb9b1b2008-06-21 00:24:17 +020011 else
12 printf "Ignoring arch: %s\n" ${arch}
13 fi
14}
15
Kirill A. Shutemovf6820302010-12-13 19:10:28 +020016archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}
Sam Ravnborg2fb9b1b2008-06-21 00:24:17 +020017
18for arch in ${archs}; do
19 case ${arch} in
20 um) # no userspace export
21 ;;
Sam Ravnborg2fb9b1b2008-06-21 00:24:17 +020022 *)
23 if [ -d ${srctree}/arch/${arch} ]; then
24 do_command $1 ${arch}
25 fi
26 ;;
27 esac
28done