[Top][All Lists]

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

allowing users to add source files without rerunning the autotools?

From: Bill Sacks
Subject: allowing users to add source files without rerunning the autotools?
Date: Thu, 12 Jan 2012 15:16:27 -0700

I work on a climate model (CESM); this is mostly written in Fortran 90, with a 
bit of C, but we are starting to add some C++ code, too. Until now, we have 
used our own, custom build system, but as the build becomes more complex, we 
are thinking of migrating towards greater use of the autotools. 

However, one challenge we face is the blurred line between developers and 
users. Many users need to modify the source code before building the model, and 
this can include adding entirely new source files. Existing code can depend on 
the new, user-created source files, and vice versa. 

We implement this ability in our current build system (which does not use any 
of the autotools) through the use of two scripts, both of which are executed 
according to rules in the makefile: The first script builds a list of all 
source files residing in a set of pre-defined directories, and the second 
script parses these source files to generate dependency lists. This system 
isn't bulletproof, but it works well for us. In particular, note that this 
means that we do not need to explicitly list the source or object files in our 
makefile, since these lists are generated at build time. 

My (admittedly limited) understanding of automake is that it requires all 
source files to be listed explicitly in, and thus any addition to 
this list would require rerunning automake, etc. 

We are wondering if it will be possible for us to support the functionality of 
user-added source files in an autotools-based build, without requiring users to 
rerun the full autotools chain. Is this possible? We can assume that 
user-created source files do not change any of the options required for the 
build (e.g., there would be no new library dependencies). 

I have read the FAQ entry on why automake doesn't support wildcards, so I'm 
wondering if there is some other workaround to achieve the functionality we 

Thank you,

reply via email to

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