libraries and the build system

Stefan (metze) Metzmacher metze at samba.org
Thu Nov 18 09:18:44 GMT 2004


> Daniel,
>
>  > Are there any architectural issues that would prohibit Samba from using
>  > Libtool? If so, would it be possible to work with Libtool developers to
>  > resolve those issues?
>
> Every time I download a package and find it uses libtool I get a "oh
> no, not again" feeling. I've just had far too many bad experiences
> with libtool, especially when something mysterious goes wrong and
> debugging it is invariably a nightmare.
>
> If we wanted something like libtool then I would write a new one that
> works like this:
>
>  - during configure it would work out what strategy is needed for the
>    various compile/linking tasks on this platform.
>
>  - this strategy would be returned in the form of a string, a bit like
>    the config.guess output, but oriented to compiler/linker type.
>
>  - the strategy strings would be chosen from a set of known
>    strategies. Internally each strategy would have a test component
>    that tests if that strategy string works.
>
>  - at configure time each strategy is tested until one is found that
>    works. There would be an internal ordering of the strategy strings
>    so the most functionally advanced strategies would be tried first.
>
>  - the tool would then take this string as input for further
>    operations, but not actually _do_ any of the compile/link
>    operations itself, it would instead return the commands needed, in
>    the form of make rules.
>
>  - these resulting make rules would be placed in the Makefile
>
>  - normal "make" will then do the actual compile/link/install, but
>    without need for any further calls to the tool
>
> So the tool would essentially be a "discovery" tool, that knows how to
> work out appropriate build rules for a platform. It would not be a
> tool that attempts to actually do the work. This makes it debuggable,
> as you get a normal Makefile, that programmers know how to edit.

That was the idea I have with samba4's build system, it should do all the
hard work and generate a well structured Makefile

BTW: I also hate libtool :-)

--
metze

Stefan Metzmacher <metze at samba dot org>


More information about the samba-technical mailing list