Grow: A declarative make-like interpreter.
Grow is a well-defined replacement for Makefiles and the like to build complex hierarchies of files with minimal effort.
Like many Makefile-like tools, Grow depends on the notion of timestamps to determine whether a file should be recompiled or not. Grow is much simpler than those, though, and I might argue way easier to use as well.
On startup, Grow will look for a file named Seed in the current directory, and evaluate the grow expressions contained within.
For example, here is a simple Seed file to compile a single C file into an executable.
tee $$arg:in { all = ($main:seq "All done !"):in $execs execs = hook ld [main] [main.o] :in $objects objects = hook cc [main.o] [main.c]
}
Notice the hook
function ? It is the Grow primitive that calls an
external program to perform actual tasks.
In Grow, hooks are expected to only accept files as their arguments,
so we have to write the wrapper scripts cc
and ld
that accept
arguments in the form "destination... source...". They are pretty
trivial to write since they only involve renaming variables and
swapping arguments.
Here are sample cc
and ld
scripts to show you there is nothing
magical about them :
#!/bin/bash obj="$1" ; shift ; src="$1" gcc -c "$src" -o "$obj"
#!/bin/bash bin="$1" ; shift ; obj="$1" gcc "$obj" -o "$bin"
In grow, instead of writing recipes in the configuration, we just declare hooks and then write the appropriate wrapper scripts to call compilers with the correct flags and arguments.
Modules
- Grow
- Language
- Language.Grow
- Syntax
- Language.Syntax.Grow
Downloads
- Grow-1.1.0.3.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 1.0, 1.1, 1.1.0.1, 1.1.0.2, 1.1.0.3 |
---|---|
Dependencies | array (>=0.5 && <0.6), base (>=4.6 && <4.7), bytestring (>=0.10 && <0.11), clock (>=0.4 && <0.5), containers (>=0.5 && <0.6), deepseq (>=1.3 && <1.4), definitive-base (>=1.2 && <1.3), definitive-filesystem (>=1.2 && <1.3), definitive-parser (>=1.2 && <1.3), definitive-reactive (>=1.0 && <1.1), directory (>=1.2 && <1.3), filepath (>=1.3 && <1.4), old-locale (>=1.0 && <1.1), primitive (>=0.5 && <0.6), process (>=1.2 && <1.3), time (>=1.4 && <1.5), unix (>=2.7 && <2.8), vector (>=0.10 && <0.11) [details] |
License | LicenseRef-OtherLicense |
Author | Marc Coiffier |
Maintainer | marc.coiffier@gmail.com |
Revised | Revision 3 made by MarcCoiffier at 2014-07-13T15:03:59Z |
Category | Build |
Home page | http://coiffier.net/projects/grow.html |
Uploaded | by MarcCoiffier at 2014-07-13T11:32:13Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 4745 total (11 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs not available [build log] Successful builds reported [all 16 reports] |