File: headers.sh

package info (click to toggle)
linux-tools 4.4-4~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 26,236 kB
  • sloc: ansic: 302,415; perl: 15,242; asm: 9,350; sh: 8,158; python: 7,955; makefile: 7,238; yacc: 2,669; cpp: 2,489; lex: 1,561; awk: 770
file content (28 lines) | stat: -rwxr-xr-x 477 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# Run headers_$1 command for all suitable architectures

# Stop on error
set -e

do_command()
{
	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
	else
		printf "Ignoring arch: %s\n" ${arch}
	fi
}

archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}

for arch in ${archs}; do
	case ${arch} in
	um)        # no userspace export
		;;
	*)
		if [ -d ${srctree}/arch/${arch} ]; then
			do_command $1 ${arch}
		fi
		;;
	esac
done