]> git.draconx.ca Git - cdecl99.git/blob - exported.sh.in
Add missing test files to the distribution.
[cdecl99.git] / exported.sh.in
1 #!@SHELL@
2 #
3 # Copyright © 2011 Nick Bowler
4 #
5 # Determine the list of exported symbols from archives or (libtool) object
6 # files.
7 #
8 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
9 # This is free software: you are free to do what the fuck you want to.
10 # There is NO WARRANTY, to the extent permitted by law.
11
12 OBJS=
13
14 while test $# -gt 0
15 do
16         case $1 in
17         /*) arg=$1   ;;
18         *)  arg=./$1 ;;
19         esac
20
21         if expr "$arg" : '.*\.lo' >/dev/null; then
22                 non_pic_object=
23                 pic_object=
24                 . "$arg"
25
26                 dir=`expr "$arg" : '\(.*\)/'`
27                 if test x"$pic_object" != x"none"; then
28                         OBJS="$OBJS $dir/$pic_object"
29                 fi
30                 if test x"$non_pic_object" != x"none"; then
31                         OBJS="$OBJS $dir/$non_pic_object"
32                 fi
33         else
34                 OBJS="$OBJS $arg"
35         fi
36
37         shift
38 done
39
40 set x $OBJS; shift
41 case $# in
42 0) : ;;
43 *) @NM@ $OBJS | @GLOBAL_SYMBOL_PIPE@ | @SED@ 's/^.* //' | sort | uniq ;;
44 esac