Re: how 2 list/collect _all_ nested dependencies
Re: how 2 list/collect _all_ nested dependencies
- Subject: Re: how 2 list/collect _all_ nested dependencies
- From: Kevin Van Vechten <email@hidden>
- Date: Thu, 6 Oct 2005 20:39:55 -0700
Yes and no. Yes, you do need to inspect each dylib for additional
dependencies; and no, you don't need to do it manually. Here's how
we do it in DarwinBuild to find the dependencies of xcodebuild(1).
###
### Recurse through frameworks and libraries looking for dependencies
###
RecurseLibs() {
echo $1 >> /tmp/installXcode.seen.$$
otool -L $1 | tail -n +2 | awk '{ print $1 }' > /tmp/
installXcode.tmplibs.$$
cat /tmp/installXcode.tmplibs.$$ >> /tmp/installXcode.libs.$$
cat /tmp/installXcode.tmplibs.$$ | while read X; do
if ! grep -q "^$X\$" /tmp/installXcode.seen.$$ ; then
RecurseLibs $X
fi
done
}
RecurseLibs /usr/bin/xcodebuild
<http://cvs.opendarwin.org/index.cgi/proj/darwinbuild/darwinbuild/
installXcodebuild?rev=1.8&content-type=text/x-cvsweb-markup>
- Kevin
On Oct 6, 2005, at 11:08 AM, OpenMacNews wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi all,
i understand 'otool -L' lists the dyn libs used by a given target.
any given dyn lib can use other dyn libs ... resulting in a 'nest'
of dependencies.
is there a way to get a list of ALL dependencies in one step? or
am i relegated to manually
'otool-ing' each listed lib, and collating the results?
the goal is to gather all dependencies in prep for creating a pkg ...
thx!
richard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden