On the maintenance complexity of makefiles

Douglas H. Martin, James R. Cordy · 2016

Build systems, the tools responsible for compiling, testing, and packaging software systems, play a vital role in the software development process. It is therefore important that they be maintained and kept up-to-date, which has been shown to be required for up to 27% of source code changes. Make, one such build tool, uses a declarative language based on Makefiles to specify the build and thus is not amenable to traditional complexity metrics. Because of this, most research into the complexity of Makefiles has focused on simple measures such as the number of lines, targets, or dependencies. In this paper, we take a different approach and observe that a large component of software maintenance is about understanding. Since the understanding task is dominated by following links and searching for related parts, we propose a new complexity metric based on the number of indirections (i.e. instances of features that require the reader to look somewhere else). We present an empirical study of the indirection complexity of a set of almost 20,000 Makefiles from more than 150 open source projects.

Read the paper · More papers on PaperTik