target/sdk: remove obsolete compatibility makefiles
[openwrt.git] / scripts / gen-dependencies.sh
index f324ba6..85962e7 100755 (executable)
@@ -20,7 +20,7 @@ XARGS="${XARGS:-xargs -r}"
 
 find $TARGETS -type f -a -exec file {} \; | \
   sed -n -e 's/^\(.*\):.*ELF.*\(executable\|shared object\).*,.* stripped/\1/p' | \
-  $XARGS -n1 readelf -d | \
+  $XARGS -n1 $READELF -d | \
   awk '$2 ~ /NEEDED/ && $NF !~ /interpreter/ && $NF ~ /^\[?lib.*\.so/ { gsub(/[\[\]]/, "", $NF); print $NF }' | \
   sort -u
 
@@ -31,4 +31,5 @@ for kmod in `find $TARGETS -type f -name \*.ko`; do
                egrep -a '^depends=' | \
                sed -e 's,^depends=,,' -e 's/,/\n/g' | \
                awk '{ print $1 ".ko" }'
-done
+done | sort -u
+rm -f $tmp