Using the bundle to develop Ocsigen
Darcs
The source of the bundle are available as a darcs repository:
darcs get http://ocsigen.org/darcs/bundle/
To generate the ./configure script, run:
aclocal -I m4 autoconf
Tracking the darcs version of Ocsigen's project
In order to use the darcs version of Ocsigen's project just add the --enable-dev to your configure options. For example:
./configure --enable-dev \ --enable-ocsimore --enable-ocsforge --enable-oclosure
Then, run the following command to clone or update all versionned content:
make pull
Then build and install with the classical commands:
make build make install
If you install Ocsigen in a directory that is writable to the current user, you may also add --disable-inplacedeps to your ./configure options. This avoid "preinstallation" of dependencies in a local directory and directly install package in the target directory. When --disable-inplacedeps is used to configure the bundle, make build will have the same effect as make build; make install.
./configure --enable-dev \
--enable-ocsimore --enable-ocsforge --enable-oclosure \
--prefix=${HOME}/ocsigen --disable-inplacedeps
Dependencies handling
The bundle use a simplistic dependencies mechanism. After a call make pull, a call to make build will only rebuild the updated packages and theirs dependencies.
To track dependencies, the bundle use some stamp files. For a package named X, there exist five stamps:
- .X-depend
- .X-pull
- .X-build
- .X-preinstall
- .X-install
The file .X-depend is an intermediate stamp that depend on .Y-install or .Y-preinstall if the package X depends on Y ("install" is used instead of "preinstall" when --disable-inplacedeps is used).
The file .X-pull is used to remember the date of last update in the source code of project X. It is updated automaticaly by {{{make pull}}} when new patches has been pulled. It must be manually updated, with touch .X-pull, when you locally recorded new patch.
The file .X-build is used to remember the date of last successful compilation. When make build is called, a package X is build only if one of the stamp files .X-depend and .X-pull is newer than .X-build.
The files .X-preinstall and .X-install are used to remember the date of last sucessful preinstallation and installation. of the package X. When make install is called, a package X is reinstalled only if .X-build is newer than .X-install.
Other Makefile's rules
Instead of executing make pull, make build or make install for all packages, you may run those commands on a specific package only by prefixing the rule the package name followed by a dash. For example for a package X, you may run:
- make X-pull to update the source of X
- make X-build to build X and its dependencies (if required)
- make X-install to install X
Creating new packages
To add a new package X in the bundle just add a file Makefile.X in the pkg/ subdirectory, if the package install a finlib package, it is recommanded to use the findlib package name as "bundle package" name. The Makefile.X must defines the following targets:
do-X-pull: ... do-X-build: ... do-X-preinstall: ... do-X-install: ... do-X-uninstall: ... do-X-clean: ... do-X-distclean: ... .X-depend: .Y-preinstall .Z-preinstall
See pkg/Makefile.macaque for a simple example.
