libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printing library version


From: Tor Lillqvist
Subject: Re: printing library version
Date: Thu, 21 May 2009 12:10:34 +0300

> Well I've always needed to get the filename (somewhat related to the library
> version) when building Windows DLLs that I can prepare a resource.in file,

grep '^dlname' libfoo.la | sed -e "s/dlname=//" -e "s/'//g" ?

But yeah, this is a chicken-and-egg problem, you want the full DLL
name in the version resource, and you want to link the resource object
into the DLL, but you won't know the name libtool will use for the DLL
before it has been built. Except if you "cheat" and just "know" how
libtool will generate the name based on the current:revision:age
triple passed to it...

Maybe running libtool with the --dry-run option and pass its output
through some suitable sed script to pick up the output file name would
be a usable way to avoid having to duplicate the knowledge of
libtool's naming strategy?

--tml




reply via email to

[Prev in Thread] Current Thread [Next in Thread]