4 ms·
I'd been thinking about just this recently. But to my mind, you don't even have to implement a build system - prolog can be directly used as one (modulo some li
by jkarni 12y ago
I'd been thinking about just this recently. But to my mind, you don't even have to implement a build system - prolog can be directly used as one (modulo some library functions). You specify a goal, and a bunch of rules that have build-related side-effects, and then building a "target" is just a query. The syntax is even pretty similar to make, minus all the inexhaustible and unintuitive intricacies.
Two things that you'd get, that to the best of my (limited) knowledge aren't possible in make, is having cut, and the notion of both "and" and "or" - not only can you declare multiple dependencies and rules, but also "alternative" rules in case one does not succeed (e.g., in case you shell-out to a non-existent binary, try a different one).