Files
heimdal/lib/auth/sia/make-rpath
Assar Westerlund 8aa04d2ad4 use make-rpath to create rpath argument to ld
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10345 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-17 15:15:31 +00:00

35 lines
423 B
Bash
Executable File

#!/bin/sh
# $Id$
rlist=
rest=
while test $# -gt 0; do
case $1 in
-R|-rpath)
if test "$rlist"; then
rlist="${rlist}:$2"
else
rlist="$2"
fi
shift 2
;;
-R*)
d=`echo $1 | sed 's,^-R,,'`
if test "$rlist"; then
rlist="${rlist}:${d}"
else
rlist="${d}"
fi
shift
;;
*)
rest="${rest} $1"
shift
;;
esac
done
rpath=
if test "$rlist"; then
rpath="-rpath $rlist "
fi
echo "${rpath}${rest}"