automake
[Top][All Lists]
Advanced

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

Re: dynamic include in Makefile.am


From: Tim Just
Subject: Re: dynamic include in Makefile.am
Date: Fri, 02 Apr 2010 12:07:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Hello Ralf,

thanks for your reply!

On 04/02/2010 11:45 AM, Ralf Wildenhues wrote:
> Hello Tim,
> 
> * Tim Just wrote on Fri, Apr 02, 2010 at 10:04:13AM CEST:
>> We use one central Makefile.am to avoid the recursive use of make. This
>> central Makefile.am contains all information related to app/ and lib/.
>> However each module defines its build system information in an own
>> Makefile.am that is located in modules/.
> [...]
>> By default each module Makefile.am should be included to the central
>> Makefile.am. Furthermore it should be possible to disable modules per
>> configure option. That is to not include the corresponding module
>> Makefile.am.
> 
> One thing you need to know about the automake 'include' feature is that
> it works at 'automake' run time: it literally copies the text of the
> included fragment files into the resulting toplevel Makefile.in file.
> That explains why things wouldn't work with your intermediate include
> file.
The automake include works are functioning for me. The only drawback is
the requirement to have automake installed in order to build the project
- but that is ok :)

> Another thing to know is that automake flattens
>   foo += bar
> 
> statements, because += is not portable to non-GNU make.
Also the += statements work fine.
(I've defined all variables with '=', before using '+=')

> That being said, automake conditionals can come to the rescue for you.
> [...]
Conditionals are fine, if you know what you want to check. But in our
scenario the list of modules is not known, when writing the configure.ac
and Makefile.am.

We want to offer the possibility to add modules without changing the
build system (i.e. edit configure.ac or Makefile.am). Therefore each
module developer has to build his 'own' Makefile.am in the modules
subdirectory.

Any suggestions will be appreciated.

Best regards,

Tim





reply via email to

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