Skip to content

Commit

Permalink
Modified the library handling in default.do to allow for "-l" type
Browse files Browse the repository at this point in the history
libraries in the current directory.
  • Loading branch information
bruceg committed Jul 5, 2005
1 parent 86f16b7 commit db18c05
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
27 changes: 20 additions & 7 deletions default.do
@@ -1,15 +1,28 @@
if test -r $1=x
then
libs=`grep '\.lib *$' "$1=x"`
libscat=''
for i in $libs
libs=""
libscat=""
dashl=""
objs=""
while read line
do
libscat="$libscat "'`'"cat $i"'`'
done
objs=`grep -v '\.lib *$' "$1=x"`
case $line in
*.lib)
libs="$libs $line"
libscat="$libscat "'`'"cat $i"'`'
;;
-l*)
dashl="$dashl $line"
libs="$libs `echo $line | sed -e 's/^-l/lib/' -e 's/$/.a/'`"
;;
*)
objs="$objs $line"
;;
esac
done < "$1=x"
dependon load $1.o $objs $libs
directtarget
formake ./load $1 $objs "$libscat"
formake ./load $1 $objs "$libscat" $dashl
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion make-load.sh
@@ -1,2 +1,2 @@
echo 'main="$1"; shift'
echo exec "$LD" '-o "$main" "$main".o ${1+"$@"}'
echo exec "$LD" '-o "$main" "$main".o -L. ${1+"$@"}'

0 comments on commit db18c05

Please sign in to comment.