Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Run headers_$1 command for all suitable architectures |
| 3 | |
| 4 | # Stop on error |
| 5 | set -e |
| 6 | |
| 7 | do_command() |
| 8 | { |
| 9 | if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then |
H. Peter Anvin | 052ad27 | 2011-11-17 13:17:35 -0800 | [diff] [blame] | 10 | make ARCH=$2 KBUILD_HEADERS=$1 archheaders |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 11 | make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 12 | else |
| 13 | printf "Ignoring arch: %s\n" ${arch} |
| 14 | fi |
| 15 | } |
| 16 | |
Kirill A. Shutemov | f682030 | 2010-12-13 19:10:28 +0200 | [diff] [blame] | 17 | archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)} |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 18 | |
| 19 | for arch in ${archs}; do |
| 20 | case ${arch} in |
| 21 | um) # no userspace export |
| 22 | ;; |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 23 | cris) # headers export are known broken |
| 24 | ;; |
| 25 | *) |
| 26 | if [ -d ${srctree}/arch/${arch} ]; then |
| 27 | do_command $1 ${arch} |
| 28 | fi |
| 29 | ;; |
| 30 | esac |
| 31 | done |
| 32 | |
| 33 | |