[Agda] Lightweight dependency management using make
Alan Jeffrey
ajeffrey at bell-labs.com
Tue May 24 17:57:20 CEST 2011
Hi everyone,
I just created a new repository at:
https://github.com/agda/agda-makefile
This is a bash at dependency management for Agda projects, since I'm
starting to build projects with common libraries.
The dependency management systems I'm familiar with are cabal and maven,
both of which are quite tightly integrated with particular languages
(Haskell and Java respectively). I could try hacking away at cabal to
make it Agda-aware, but this sounds like hard work to me! (AFAIK the
state of play on Agdaizing cabal is still as discussed here:
http://thread.gmane.org/gmane.comp.lang.agda/1055 but it could be that
more has happened since, although the program notes for AIMXII
http://wiki.portal.chalmers.se/agda/pmwiki.php?n=AIMXII.Notes suggest
not :-)
So I hacked out a quick-and-dirty (or "lightweight" if you prefer)
makefile that uses curl to download dependencies. The core of it is to
allow makefiles to declare dependencies, for example:
dependencies = bar baz
and declare the tarball URIs for those dependencies:
bar = http://example.com/bar.tgz
baz = http://example.com/bar.tgz
from which a target "install-dependencies" downloads, unpacks, and
installs the dependencies. There's also some standard targets to
typecheck or generate HTML, for example:
install-agda: $(agdadir)/Foo.agdai
install-html: $(htmldir)/Foo.html
install: install-dependencies install-agda install-html
You can see it in action in the project
https://github.com/agda/agda-text-xml which depends on
https://github.com/agda/agda-web-uri (currently these are skeleton
projects, but will be filled in real soon now).
Thoughts?
Alan.
More information about the Agda
mailing list