Contractor is a system for building dependent sets of packages. It differs from a simple build script in that builds can be stopped, restarted, adjusted and updated. The packages are installed in a communal directory ("install"); a setup script ("setup.sh") to add the relevant subdirectories to the appropriate paths is generated by Contractor.
Contractor breaks a build into many stages called nodes. (Contractor maintains an internal directed acyclic graph where the build stages and dependencies are the nodes and edges, respectively.) Some nodes are convenience entries, such as "clean." Since the build contains many nodes, most of which are not directly interesting to the end user, only a subset of nodes most likely to be invoked separately are labeled targets.
will configure the default options and build the default target.
lists the help options.
will display the current configuration.
Configuration options are cumulative. If the default value of "foo" is 1 and the default value of "bar" is 2 and we type
./contract.py --configure foo=3
we would have foo=3 and bar=2. If we then wanted to change bar, we could do
./contract.py --configure bar=4
which would leave us with foo=3 and bar=4. In order to return to the defaults, we would have to do
which would return us to foo=1, bar=2.
pkgA depends on two packages, pkgB and pkgC, each of which depends on the autotools chain. The complete source for the contract is included in trivial-contract.tar.gz .