[Top][All Lists]

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

Re: looking for a good example of non-recursive Make using project

From: Bob Friesenhahn
Subject: Re: looking for a good example of non-recursive Make using project
Date: Mon, 19 Nov 2012 15:16:29 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 19 Nov 2012, Eric Blake wrote:

You can reduce the pain by using variables:

more = more
prog_SOURCES += ${more}/file3.c ${more}/file4.c

so that a rename now only has to touch the 'more =' line, rather than
every use.

The most serious problem is this incantation for 'prog' output to subdirectory 'foo/bar':

foo_bar_prog_SOURCES += foo/bar/file3.c foo/bar/file4.c

Note that the make variable name needs to include a representation of the path components.

A good paradigm for non-recursive make is to put Automake include fragments into each directory which support the files in that directory. The top then includes these fragments. It would be useful if there was a syntax whereby the necessary subdirectory paths could be automatically inserted into Makefile variables and file paths based on the location of the Automake include file.

Since is produced by Perl, it should be possible to support this path simplification while still building a working makefile which emulates a heirarchical build style.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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