2001-12-31 04:19:29 +01:00
|
|
|
#!/bin/sh
|
2002-01-13 21:03:03 +01:00
|
|
|
# speclib - Make a special version of the cygwin import library.
|
|
|
|
#
|
|
|
|
# Copyright 2001, 2002 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# This file is part of Cygwin.
|
|
|
|
#
|
|
|
|
# This software is a copyrighted work licensed under the terms of the
|
|
|
|
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
# details.
|
|
|
|
|
2001-12-31 04:19:29 +01:00
|
|
|
case "$1" in
|
|
|
|
-v) v="-v"; shift
|
|
|
|
esac
|
|
|
|
lib=$1; shift
|
|
|
|
nm=$1; shift
|
|
|
|
dlltool=$1; shift
|
2002-01-22 02:40:11 +01:00
|
|
|
as=$1; shift
|
2001-12-31 04:19:29 +01:00
|
|
|
def=$1; shift
|
2002-01-23 19:46:19 +01:00
|
|
|
trap "rm -f /tmp/$$.def" 0 1 2 15
|
2001-12-31 04:19:29 +01: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
|
2002-01-24 22:39:09 +01:00
|
|
|
$dlltool --as=$as -d /tmp/$$.def -l "$lib"
|