]> Pileus Git - ~andy/linux/blobdiff - scripts/tags.sh
checkpatch: type/cast spacing should not check prefix spacing
[~andy/linux] / scripts / tags.sh
index 3c814ba0fa85850a53099b96ef630675ff0b68ce..fdbe78bb5e2b6ad8359aeabb26b0fcf98af44957 100755 (executable)
@@ -7,7 +7,7 @@
 # Uses the following environment variables:
 # ARCH, SUBARCH, srctree, src, obj
 
-if [ $KBUILD_VERBOSE == 1 ]; then
+if [ "$KBUILD_VERBOSE" = "1" ]; then
        set -x
 fi
 
@@ -18,12 +18,17 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \
           -prune -o"
 
 # Do not use full path is we do not use O=.. builds
-if [ "${KBUILD_SRC}" == "" ]; then
+if [ "${KBUILD_SRC}" = "" ]; then
        tree=
 else
        tree=${srctree}/
 fi
 
+# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
+if [ "${ALLSOURCE_ARCHS}" = "" ]; then
+       ALLSOURCE_ARCHS=${SRCARCH}
+fi
+
 # find sources in arch/$ARCH
 find_arch_sources()
 {
@@ -54,26 +59,29 @@ find_other_sources()
 find_sources()
 {
        find_arch_sources $1 "$2"
-       find_include_sources "$2"
-       find_other_sources "$2"
 }
 
 all_sources()
 {
-       find_sources $SRCARCH '*.[chS]'
+       for arch in $ALLSOURCE_ARCHS
+       do
+               find_sources $arch '*.[chS]'
+       done
        if [ ! -z "$archinclude" ]; then
                find_arch_include_sources $archinclude '*.[chS]'
        fi
+       find_include_sources '*.[chS]'
+       find_other_sources '*.[chS]'
 }
 
 all_kconfigs()
 {
-       find_sources $SRCARCH 'Kconfig*'
+       find_sources $ALLSOURCE_ARCHS 'Kconfig*'
 }
 
 all_defconfigs()
 {
-       find_sources $SRCARCH "defconfig"
+       find_sources $ALLSOURCE_ARCHS "defconfig"
 }
 
 docscope()
@@ -84,7 +92,6 @@ docscope()
 
 exuberant()
 {
-       all_sources > all
        all_sources | xargs $1 -a                               \
        -I __initdata,__exitdata,__acquires,__releases          \
        -I __read_mostly,____cacheline_aligned                  \
@@ -135,10 +142,10 @@ xtags()
 
 
 # Support um (which uses SUBARCH)
-if [ ${ARCH} == um ]; then
-       if [ $SUBARCH == i386 ]; then
+if [ "${ARCH}" = "um" ]; then
+       if [ "$SUBARCH" = "i386" ]; then
                archinclude=x86
-       elif [ $SUBARCH == x86_64 ]; then
+       elif [ "$SUBARCH" = "x86_64" ]; then
                archinclude=x86
        else
                archinclude=${SUBARCH}