[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Looping over object files
From: |
Robert Boehne |
Subject: |
Looping over object files |
Date: |
Thu, 07 Dec 2000 18:31:52 -0600 |
In this hacked section of libtool, the normal $archive_cmds
is checked for the command length, if it is less than the maximum
it is executed as libtool currently would. If it is larger,
an alternative command is used. Under this current scheme, I
am having problems getting the incremental linking to work.
After the variable "$cmds" is set it goes into a for loop
to get executed, if I put a for loop in $incr_archive_cmds, then it
doesn't
seem to work. Either the commands executed in $incr_archive_cmds' for
loop
should be expanded out so they will be executed by the for loop below,
or $cmds needs to contain one entry with $incr_archive_cmds' for loop in
it.
If I put a for loop in $incr_archive_cmds, how do I separate the parts
of the command? There is some $IFS modification below, so how does that
work?
new_cmd=`eval echo $archive_cmds`
this_cmd_len=`echo ${new_cmd} | wc -c`
echo "this_cmd_len is $this_cmd_len"
if test $this_cmd_len -lt $max_cmd_len ; then
eval cmds=\"$archive_cmds\"
echo "Evaluating the link directly for $this_cmd_len character
argument"
else
eval cmds=\"$incr_archive_cmds\"
echo "Evaluating $incr_archive_cmds"
echo "Evaluating the link incrementally for $this_cmd_len character
argument"
fi
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
I have tried
for obj in $objs ~ do ~ ar -ru templib.a $obj ~ done ~
make_sharedlib_from_libtemp.a
and
for obj in $objs ; do ; ar -ru templib.a $obj ; done ~
make_sharedlib_from_libtemp.a
in these cases, the $obj seems to disappear when the command is
evaluated.
I would also like any suggestions for better ways to get this done,
frankly
I don't know what I'm doing and it shows. :(
Cheers!
Robert
--
Robert Boehne Software Engineer
Ricardo Software Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Looping over object files,
Robert Boehne <=