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