[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Build systems suck. Can Lua be the basis for a better build system?
- From: David Given <dg@...>
- Date: Fri, 08 Mar 2013 11:04:37 +0000
Spencer Parkin wrote:
[...]
> 1) Use Lua as the make-file language.
Been there, done that...
http://primemover.sourceforge.net/
[...]
> 4) Write the dep-graph executor in C/C++. Be as fast as possible!
I don't know if anyone's suggested it, but ninja is a good candidate for
this:
http://martine.github.com/ninja/
Basically, build automation is hard. Really hard. Hard in a way that's
very difficult to solve, because at least 80% of the hardness is coming
up with a decent *user interface*. Actually running the dependency graph
is, as you say, not particularly difficult. Coming up with a way for the
user to succinctly and expressively tell the build system what the graph
looks like is much harder.
Prime Mover was an experiment at producing a build system with no
implicit rules, instead using semantic sugar to allow rules to be
expressed explicitly with very little typing. It also had special
functionality for building trees multiple times with different build
options. I needed it to build a compiler suite with some irritatingly
hard dependencies (had to build tools to build source files to build
other tools to build the compiler itself, multiple times for each target).
It worked really well, up to the point where the fundamental design flaw
kicked in (*don't* store lists of arguments in strings, it never works).
Plus the tree-based structure made certain dependency graph structures
very hard to represent, such as having multiple items in a tree all
depending on the same thing *outside* the tree.
One day I'd like to go back and have another go --- but I've come round
to the thinking that it's almost certainly better to use a worse but
standard tool than to write a better but unknown one.
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎 𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│
Attachment:
signature.asc
Description: OpenPGP digital signature