Home
Education Page
Description
Schedule
Mailinglists
Literature
Book
Slides
WebLog
Assignments
Learning Wiki
Personal Log
Projects
Reviews
GW
Center
Master Program
Center
Home
Courses
People
Projects
Page
Edit Page
Rename Page
Attach File
Printable
Wiki Source
More ...
Web
Recent Changes
Notify Service
News
Page Index
Search
More ...
Wiki
About TWiki
Text Formatting
Registration
Change Password
Reset Password
Users
Groups
Log In
or
Register
Build Management
Swe05
---++ Description Software systems consist of _sources_ (things directly manipulated by humans), and _derivates_ (things that are derived automatically from the sources). Derivates are constructed from the sources by applying _tools_. Examples are the construction of executables from C source files using a C compile, or the generation of C source files from Yacc parser specifications using Yacc. Complex systems can consist of tens of thousands of source files, hundreds of tools, and enormous amounts of derived information. It is infeasible to create the derivates by manually running the tools on the sources; this should be done automatically using a _build manager_. Also, it is impractical to rebuild all derivates every time a programmer makes a (small) change to the sources. The build manager should ensure that only those derivates that are actually influenced by the change are rebuilt. In other words, the job of a build manager is to ensure that the software system is _consistent_; i.e., that all derivates are derived from current sources, or are equal to what they would be if they had been derived from current sources. In practice, this turns out to be a surprisingly hard problem. ---++ Tools * The "industry standard" build tool is Feldman's _make_ program, which was introduced in the [[http://plan9.bell-labs.com/7thEdMan/bswv7.html Seventh Edition of the Unix operating system]]. There are countless clones (not all source compatible), the most commonly used being [[http://www.gnu.org/software/make/ GNU Make]] which is installed on virtually every GNU/Linux system. Make's model is very simple: systems are described as a set (a _makefile_) of _rules_ that specify a command with which a list of derivates (_targets_) can be created from a list of sources (_dependencies_). Make rebuilds derivates if any of the sources has a newer file system timestamp. Unfortunately, make often causes inconsistent builds, since (a) makefiles tend to specify incomplete dependency information, and (b) the up-to-date detection is unreliable; e.g., changes to compiler flags will not trigger recompilation. Make's input language is also quite simplistic, making it hard to specify variants. * There are some Make clones that attempt to fix Make's fundamental defects. For example, [[http://makepp.sourceforge.net/ Makepp]] tracks derivates, including the commands used to build them, and can generate dependency lists automatically. * [[ftp://ftp.cs.colorado.edu/pub/distribs/odin/][Odin]] is quite a bit more advanced than Make. Odin's input language is essentially functional: derivates are things that can be derived by applying tools - functions - to sources or other derivates. For example, the expression =hello.c= denotes a source, while =hello.c :exe= denotes the executable obtained by compiling =hello.c=. Variant builds can be specified easily by extending an expression with parameters: =hello.c +debug :exe= yields an executable with debug information turned on. * Amake was the build tool for the Amoeba distributed operating system. An important aspect is the separation of build tools and system specifications, leading to higher abstraction. Amake can be found in the [[ftp://ftp.cs.vu.nl/pub/amoeba/amoeba5.3/src Amoeba 5.3 distribution]]. * Other build tools: [[http://www.gnu.org/directory/devel/cons.html][GNU cons]], [[http://www.canb.auug.org.au/~millerp/cook/cook.html][cook]], [[http://www.gnu.org/directory/devel/build/makepp.html][Makepp]] ---++ Related tools * Since makefiles have a tendency to become [[http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in?rev=1.953&content-type=text/x-cvsweb-markup big and hard to maintain]], there are tools that _generate_ them from a higher-level description of the system. [[http://www.gnu.org/software/automake/automake.html GNU Automake]] is a well-known example. It often suffices to specify the names of the sources and derivates; Automake automatically generates rules based on its knowledge of certain programming languages. * Systems often must be build on a wide variety of platforms. [[http://www.gnu.org/software/autoconf/autoconf.html GNU Autoconf]] generates configuration scripts - to be run on the target platform - that automatically detect properties of the platform. Such properties typically include presence of certain header files, libraries or packages, endianness and word sizes, etc. The scripts are typically used to generate makefiles or C header files to adapt the system to the platform. ---++ Papers * S. I. Feldman. [[http://citeseer.nj.nec.com/feldman79make.html][Make --- A Program for Maintaining Computer Programs]]. In _Software --- Practice and Experience_, Vol. 9, No. 4, April 1979, pp. 255--265. Revised April 1986. * Miller, [[http://www.canb.auug.org.au/~millerp/rmch/recu-make-cons-harm.html][Recursive make considered harmful]]. * Baalbergen, Verstoep, Tanenbaum, [[http://citeseer.nj.nec.com/baalbergen89design.html On the design of the Amoeba Configuration Manager]]. * Amake User Reference Manual, section 6.3 of the [[ftp://ftp.cs.vu.nl/pub/amoeba/manuals/pro.pdf Amoeba Reference Manual]]. * Geoffrey M. Clemm. [[ftp://ftp.cs.colorado.edu/pub/distribs/odin][The Odin System --- Reference Manual]], 1997, chapters 1--3. * Peter Miller. [[http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html][Recursive Make Considered Harmful]], 1997. * Erik H. Baalbergen, Kees Verstoep, and Andrew S. Tanenbaum. On the design of the Amoeba Configuration Manager. In _Proc. 2nd Int. Works. on Software Configuration Management_, Vol. 17, No. 7 of _ACM SIGSOFT Software Engineering Notes_, pp. 15--22, November 1989. * David <nop>MacKenzie, Ben Elliston, and Akim Demaille. [[http://www.gnu.org/manual/autoconf-2.53/autoconf.html][Autoconf --- Creating Automatic Configuration Scripts]] (edition 2.53), March 2002, chapters 1--3. * David <nop>MacKenzie and Tom Tromey. [[http://www.gnu.org/manual/automake-1.6.1/automake.html][GNU Automake]] (version 1.6.1), April 2002, chapters 1--3. -- Main.EelcoDolstra - 21 Oct 2002 <br />