[RFC] configure/makefile cleanup

Tomas Carnecky tom at dbservice.com
Wed Aug 4 02:44:35 PDT 2010


On 8/3/10 10:34 PM, Tomas Carnecky wrote:
> Especially difficult was to figure out which extensions depend on what,
> as you see in patch 3, OS_LIB depends on FIXES_LIB (EnabledCursor).
> Then also RENDER_LIB depends on OS_LIB (x_sha1_* methods) and there
> may be other dependencies which I'm not aware of. I'd like to see
> a list or document or even just a header which describes what each
> extension expects and relies on. I can do that for DPMS (now that I've

The attached ruby script scans all archives (*.a), extracts which
symbols are defined and which symbols are referenced. Then it reports
which other archives each archive depends on. When run with -v
(verbose), then it also lists referenced symbols and where the symbols
have been declared. Example:

Report for libos
  PictureCmapPolicy -> librender, libxorg
  serverClient -> libdix, libxorgxkb, libxorg
  ddxProcessArgument -> libcommon, libxorg
  ...
  Dependencies: libdixmods, libxkb, libdix, libXext, libxfixes,
libcommon, librender

You see that libos depends not only on libxfixes, but also librender,
libXext and libraries from the Xorg DDX. For each symbol you also see
where the symbol is defined. It lists all archives where each symbol was
found, and because libxorg includes many other libraries the symbols are
also defined there. However, the script tries to be smart and only put
the archive where the symbol was originally defined to the final
dependencies list (this is why you don't see libxorg there).

Run the script as: ./find-deps.rb [-v] [path which to scan for archives,
default is cwd]
I hope someone finds this useful.

tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-deps.rb
Type: text/x-ruby-script
Size: 2801 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100804/6b5f2375/attachment.bin>


More information about the xorg-devel mailing list