Revision de2addf592894b31b8149cca008f00d8102401e9 authored by Ian Campbell on 28 October 2008, 13:36:25 UTC, committed by Sam Ravnborg on 29 October 2008, 21:27:17 UTC
Architectures which have moved their includes to arch/<ARCH>/include
now list the headers twice in the source listing used by "make
cscope" and friends, causing those tools to list symbols twice.

Skipping these files in the ALLSOURCE_ARCHS pass rather than removing
the ALLINCLUDE_ARCHS pass preserves the semantics of the later.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent f03b283
Raw File
headers.sh
#!/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
	elif [ -f ${srctree}/include/asm-$2/Kbuild ]; then
		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
	else
		printf "Ignoring arch: %s\n" ${arch}
	fi
}

# Do not try this architecture
drop="generic um ppc sparc64 cris"

archs=$(ls ${srctree}/arch)

for arch in ${archs}; do
	case ${arch} in
	um)        # no userspace export
		;;
	ppc)       # headers exported by powerpc
		;;
	sparc64)   # headers exported by sparc
		;;
	cris)      # headers export are known broken
		;;
	*)
		if [ -d ${srctree}/arch/${arch} ]; then
			do_command $1 ${arch}
		fi
		;;
	esac
done


back to top