On Wed, 13.08.08 11:54, Daniel Macks ([EMAIL PROTECTED]) wrote:

> For clarity and to simplify the makefile logic a bit, you might
> consider putting everything for the gtk lib into a separate subdir
> instead of lumped into src/ with the main lib. That way the top-level
> Makefile.am can use HAVE_GTK to control whether the whole gtk dir is
> used or not instead of being interspersed with the other lib in
> src/Makefile.am. So Makefile.am does something like:
> 
>   if HAVE_GTK
>   gtk_src = gtk
>   endif
>   SUBDIRS = src $(gtk_src) doc libltdl
> 
> and gtk/Makefile.am, which gets all the gtk parts of current
> src/Makefile.am, gets
> 
>   AM_CPPFLAGS = -I$(top_srcdir)/src
> 
> and use ../src/libcanberra.la to link to that lib. The two libs become
> more compartmentalized (configure already proves they have independent
> interface versioning) and src/Makefile.am and gtk/Makefile.am become
> specific to just one lib each.

If I understood your proposal correctly you are suggesting adoption of
recursive make for building binaries and libs?

I dislike recursive make with a passion, I consider it a feature if a
build system doesn't use recursive make. Also see "Recursive Make
Considered Harmful":

http://miller.emu.id.au/pmiller/books/rmch/

For most of my newer projects I adopted some kind of hybrid scheme:
use recursive make for building docs and stuff seperately, but build
binaries from a single Makefile. And that's how I did it in
libcanberra, too. That avoids most of the problems you get by using
recursive make, but still keeps some things seperate.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
libcanberra-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/libcanberra-discuss

Reply via email to