Initial RPM of gdb.
[fedora-mingw.git] / filesystem / mingw-find-requires.sh
index 1a63fc3..6b9848a 100755 (executable)
@@ -10,12 +10,19 @@ fi
 
 [ -z "$OBJDUMP" ] && OBJDUMP=i686-pc-mingw32-objdump
 
+# Get the list of files.
+
 filelist=`sed "s/['\"]/\\\&/g"`
 
-dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll')
+# Everything requires mingw-filesystem of at least the current version
+# and mingw-runtime.
+echo 'mingw-filesystem >= @VERSION@'
+echo 'mingw-runtime'
+
+dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll$')
 
 for f in $dlls; do
-    $OBJDUMP -p $f | grep 'DLL Name' | grep -Eo '[[:alnum:]_]+\.dll' |
+    $OBJDUMP -p $f | grep 'DLL Name' | grep -Eo '[-._[:alnum:]]+\.dll' |
         tr [:upper:] [:lower:] |
         sed 's/\(.*\)/mingw(\1)/'
 done | sort -u