--- zzzz-none-000/linux-4.9.218/scripts/tags.sh 2020-04-02 15:20:41.000000000 +0000 +++ seale-7590ax-750/linux-4.9.218/scripts/tags.sh 2023-03-29 10:59:08.000000000 +0000 @@ -28,6 +28,20 @@ # ignore userspace tools ignore="$ignore ( -path ${tree}tools ) -prune -o" +# get all AVM subprojects, with an optional path suffix +path_for_each_avm_subproject() +{ + local relpath="$1" + local path + + for subproject in ${AVM_SUBPROJECTS_PATHS}; do + path="${tree}${subproject}/${relpath}" + if [ -e "${path}" ]; then + echo "${path}" + fi + done +} + # Find all available archs find_all_archs() { @@ -68,8 +82,8 @@ # find sources in include/ find_include_sources() { - find ${tree}include $ignore -name config -prune -o -name "$1" \ - -not -type l -print; + find ${tree}include $(path_for_each_avm_subproject include) $ignore \ + -name config -prune -o -name "$1" -not -type l -print; } # find sources in rest of tree @@ -346,3 +360,17 @@ if [ -n "$remove_structs" ]; then LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1 fi + +if [ "$1" != "cscope" ] ; then + LANG=C sed -i -e ' + # "original" location is now drivers/net/ethernet/avm/avm_cpmac/ + s,\(drivers\/net\/\)\(avm_cpmac\/\),\1ethernet\/avm\/\2,; + + # filter out some strange files that should not appear in tags + /\sdrivers\/char\/avm_new\/test_event.h\s/d; + /\sdrivers\/char\/flash_update\/urlader_eva\/include\//d; + /\sdrivers\/char\/flash_update\/urlader_eva\/src\//d; + /\sdrivers\/char\/flash_update\/urlader_eva\/tools\//d; + /\sdrivers\/char\/flash_update\/urlader_eva\/zlib-1.2.2\//d; + ' $1 +fi