While I do not advocate the use of ocamlbuild, we could draw some
inspiration from the design.

Essentially, an ocamlbuild-based build system is based around a library
of rules (implemented in OCaml, we could do the same in Python, of
course), and any number of trivial description files. OCamlBuild itself
contains a solver that finds one possible solution to build the target
by applying the rules to the description files and source files.

For instance, to extract documentation from some source code:
- create a file foo.odocl, containing the list of all files that should
be passed to the documentation generator;
- ocamlbuild's standard rule library knows how to produce %.html from
%.odocl;
- it is pretty easy to add a rule to produce %.pdf from %.odocl.

Generally, this design is rather good at separating tasks that need a
full language (implemented as rules) from tasks that only need a trivial
description (implemented as description files).

Cheers,
 David

On 8/23/12 8:19 AM, Mike Hommey wrote:
> As I said on irc, i think the "language" for build manifests should be
> something between .ini and jar.mn. Because they're simple,
> straightforward, and are well known. And simple.
> 
> I understand why people are eager to use python or lua, or other
> scripting languages. But the fact is you really only need scripting in
> very rare cases. The vast majority of our build is "take this file, put
> it there", "take this file, preprocess it, put it there", "compile this"
> or "link that". And occasionally, we need to add flags for specific files.
> The build manifests should make defining those extremely simple.
> 
> There's also the case of conditionals. But i think the vast majority of
> the conditionals we use are of the type "do this only on windows", or
> "do this only on arm"
> 
> The few remaining things can have python scripts, but let's worry about
> them later.
> 
> Mike
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
> 


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to