Four Languages and Lots of Macros: Analyzing Autotools Build Systems

kaestner@cs.cmu.edu (J. Al-Kofahi, S. Kothari, C. Kästner)
Fri, 09 Feb 2018 09:07:32 -0500

Jafar Al-Kofahi, Suresh Kothari, and Christian Kästner. Four Languages and Lots of Macros: Analyzing Autotools Build Systems. In Proceedings of the 16th ACM International Conference on Generative Programming and Component Engineering (GPCE), pages 176--186, New York, NY: ACM Press, October 2017.

Build systems are crucial for software system development, however there is a lack of tool support to help with their high maintenance overhead. GNU Autotools are widely used in the open source community, but users face various challenges from its hard to comprehend nature and staging of multiple code generation steps, often leading to low quality and error-prone build code. In this paper, we present a platform AutoHaven to provide a foundation for developers to create analysis tools to help them understand, maintain, and migrate their GNU Autotools build systems. Internally it uses approximate parsing and symbolic analysis of the build logic. We illustrate the use of the platform with two tools: ACSense helps developers to better understand their build systems and ACSniff detects build smells to improve build code quality. Our evaluation shows that AutoHaven can support most GNU Autotools build systems and can detect build smells in the wild.