automake
[Top][All Lists]
Advanced

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

Re: monolithic Makefile.am


From: Richard Boulton
Subject: Re: monolithic Makefile.am
Date: 02 May 2002 23:40:53 +0100

On Thu, 2002-05-02 at 23:19, Harlan Stenn wrote:
> So what options exist for making a single top-level monolithic Makefile.am?
> 
> I can't imagine keeping this file up-to-date by hand, especially on a large
> project where changes must be frequently made by multiple developers.
> 
> Ideas?

I split mine up into sub-files, one in each directory, using "include".

ie: Makefile.am, includes "src/subMake.am", which includes
"src/foo/subMake.am", etc.

Each subMake.am must add itself to EXTRA_DIST.  Also, all paths inside
subMake.am have to be relative to the top Makefile.  Variables which may
have entries added in several places (such as CFLAGS) are set to an
empty value in Makefile.am, and appended to in subMake.am's.

I've not worked out a solution for letting each subMake.am add something
to a rule such as "install-local".  I set such rules in the top
Makefile.am, if needed (the problem is that, if two subMake.am's define
install-local:, make will complain about a multiply defined rule. 
Perhaps automake should merge them somehow (or at least, a mechanism for
telling automake to merge them could be provided))

Other than that, it's all pretty workable.

-- 
Richard



reply via email to

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