block: add a bdev_check_media_change helper
[linux-2.6-microblaze.git] / scripts / tags.sh
index 4e18ae5..32d3f53 100755 (executable)
@@ -91,20 +91,10 @@ all_sources()
 
 all_compiled_sources()
 {
-       for i in $(all_sources); do
-               case "$i" in
-                       *.[cS])
-                               j=${i/\.[cS]/\.o}
-                               j="${j#$tree}"
-                               if [ -e $j ]; then
-                                       echo $i
-                               fi
-                               ;;
-                       *)
-                               echo $i
-                               ;;
-               esac
-       done
+       realpath -es $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) \
+               include/generated/autoconf.h $(find -name "*.cmd" -exec \
+               grep -Poh '(?(?=^source_.* \K).*|(?=^  \K\S).*(?= \\))' {} \+ |
+               awk '!a[$0]++') | sort -u
 }
 
 all_target_sources()