Commit | Line | Data |
---|---|---|
2fb9b1bd | 1 | #!/bin/sh |
b2441318 | 2 | # SPDX-License-Identifier: GPL-2.0 |
2fb9b1bd SR |
3 | # Run headers_$1 command for all suitable architectures |
4 | ||
5 | # Stop on error | |
6 | set -e | |
7 | ||
8 | do_command() | |
9 | { | |
10 | if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then | |
11 | make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 | |
2fb9b1bd SR |
12 | else |
13 | printf "Ignoring arch: %s\n" ${arch} | |
14 | fi | |
15 | } | |
16 | ||
f6820308 | 17 | archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)} |
2fb9b1bd SR |
18 | |
19 | for arch in ${archs}; do | |
20 | case ${arch} in | |
21 | um) # no userspace export | |
22 | ;; | |
2fb9b1bd SR |
23 | *) |
24 | if [ -d ${srctree}/arch/${arch} ]; then | |
25 | do_command $1 ${arch} | |
26 | fi | |
27 | ;; | |
28 | esac | |
29 | done |