Page History

Turn Off History

Condor's Imake Build System Coding Guidlines and Conventions

Revised: Tue Jun 22 14:24:56 CDT 2004

Background

I, Pete Keller, am writing this in May 2004. The Imake system has been a painful thorn in the side of Condor since anyone could remember. This document describes the work which I have done and a new coding style for Imakefiles et. al. which will change our Imake system from a terrible collection of unrewarding migraines into manageable collection of rewarding migraines. After performing all of this work, I have come to the realization that eventually GNU M4 should replace imake as the macro processor in our build system. Imake's initial designers had made a terrible choice in using a preprocessor for a nonwhitespace sensitive language, i.e., C, for a whitespace sensitive language, i.e, Makefiles. Currently, things *should* work for a good many number of ports, but the headaches of "keeping everything just right" might get to much, and the evolution will continue.

The biggest problem with using imake seemed to be a fundamental lack of understanding for how it was supposed to work in the first place. Poorly implemented rules which "worked" on old cpps were simply copied around and their implementation became cannon. Until it stopped working. This situation happened because GCC's cpp started conforming to the rules that they had avoided for so long. However, many OSes vendor cpps tread into undefined territory, so I worked hard to find a common ground, the stuff that all cpps are supposed to implement.

The main culprits for the failure of our Imake system to be resilient and robust comes down to two systemic problems. Serious misuse of whitespace and the '##' concatenation operator. These two problems alone caused the most headaches while trying to port Condor to a new compiler which happens often and will, if it had been left alone, cause problems for the rest of eternity.

Guidelines and Rules for the Use of Imake with Condor

Conventions in the Imake Build Files