[Top][All Lists]

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

RE: Handling of Makefile variables

From: Duft Markus
Subject: RE: Handling of Makefile variables
Date: Wed, 5 Nov 2008 08:02:17 +0100

> Ralf Wildenhues wrote:
> > * LCID Fire wrote on Tue, Nov 04, 2008 at 08:41:01PM CET:
> >> On my app I'm currently trying to switch from one big Makefile to
> >> multiple ones.
> >
> > Why?
> >
> > Besides having multiple files that each turn to fully
> > fledged Makefile files, you could also have fragments
> > and include them from the master one (in which case you
> > have to carry along all the relative paths).  But it usually builds
> > faster and parallelizes better.
> I try to refactor the sourcecode into a directory structure because
> root directory gets a little bit packed.
> >> So I have in the root directory a and some in
> >> directories underneath. The thing I noticed is: Even though I set
> >> AM_CFLAGS in the root these options are not used in the
> ones
> >> underneath.
> > Correct.  To set variables globally, AC_SUBST them from
> The thing I tried to achieve is to collect all the sourcefiles through
> the SUBDIRS structure downwards and then in some subdirectory build
> SOURCES variable - and using AC_SUBST it complains that subst is not
> allowed to be used in SOURCES. What's the "correct" way to do this?

This sounds like you'd need some tool like confix [1], which
automatically creates an autotools project from more or less scratch.
You just have to create 'Confix2.dir' instead of '', and call
' --bootstrap [--use-libtool]'. This tool will then traverse
the whole source tree, collect together all source files, write
''s, call automake/autoconf/libtool, etc.

This is a very convenient (and extensible!) way of using autotools,
which I'm now using quite some time (I know the author, so....) ;)

Hope that helps. Feel free to ask, if you have questions.


Cheers, Markus


reply via email to

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