2001-12-31 11:19:29 +08:00
|
|
|
#!/bin/sh
|
|
|
|
case "$1" in
|
|
|
|
-v) v="-v"; shift
|
|
|
|
esac
|
|
|
|
lib=$1; shift
|
|
|
|
nm=$1; shift
|
|
|
|
dlltool=$1; shift
|
|
|
|
def=$1; shift
|
2002-01-02 08:06:35 +08:00
|
|
|
trap "rm /tmp/$$.def" 0 1 2 15
|
2001-12-31 11:19:29 +08:00
|
|
|
(echo "LIBRARY cygwin1.dll
|
|
|
|
EXPORTS"; $nm --extern-only --defined-only $* | sed -e '/^[ ]*$/d' -e '/:$/d' -e 's/^.* _\(.*\)/\1/' | grep $v -f - -w $def |egrep -vi '^library|exports|^$' | sort) > /tmp/$$.def
|
|
|
|
exec $dlltool -d /tmp/$$.def -l "$lib" -D /dev/null
|