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 |
| 10 | make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 11 | else |
| 12 | printf "Ignoring arch: %s\n" ${arch} |
| 13 | fi |
| 14 | } |
| 15 | |
Kirill A. Shutemov | f682030 | 2010-12-13 19:10:28 +0200 | [diff] [blame] | 16 | archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)} |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 17 | |
| 18 | for arch in ${archs}; do |
| 19 | case ${arch} in |
| 20 | um) # no userspace export |
| 21 | ;; |
Sam Ravnborg | 2fb9b1b | 2008-06-21 00:24:17 +0200 | [diff] [blame] | 22 | cris) # headers export are known broken |
| 23 | ;; |
| 24 | *) |
| 25 | if [ -d ${srctree}/arch/${arch} ]; then |
| 26 | do_command $1 ${arch} |
| 27 | fi |
| 28 | ;; |
| 29 | esac |
| 30 | done |
| 31 | |
| 32 | |