X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=scripts%2Ftags.sh;h=8509bb51293530fae488f60594199031cd16bf07;hb=9b8eb4d14767209c83087063352cd04266ecdfd1;hp=caa867dba16de32aad4a2494e2f3d04bdb3d6f86;hpb=4431d4ce996de2cd2c45583209ba0dbbc9bf2795;p=safe%2Fjmp%2Flinux-2.6 diff --git a/scripts/tags.sh b/scripts/tags.sh index caa867d..8509bb5 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -18,15 +18,28 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ -prune -o" # Do not use full path if we do not use O=.. builds +# Use make O=. {tags|cscope} +# to force full paths for a non-O= build if [ "${KBUILD_SRC}" = "" ]; then tree= else tree=${srctree}/ fi +# Find all available archs +find_all_archs() +{ + ALLSOURCE_ARCHS="" + for arch in `ls ${tree}arch`; do + ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/} + done +} + # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH if [ "${ALLSOURCE_ARCHS}" = "" ]; then ALLSOURCE_ARCHS=${SRCARCH} +elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then + find_all_archs fi # find sources in arch/$ARCH @@ -97,13 +110,7 @@ all_defconfigs() docscope() { - # always use absolute paths for cscope, as recommended by cscope - # upstream - case "$tree" in - /*) ;; - *) tree=$PWD/$tree ;; - esac - (cd /; echo \-k; echo \-q; all_sources) > cscope.files + (echo \-k; echo \-q; all_sources) > cscope.files cscope -b -f cscope.out }