$ docker run --rm -ti alpine sh
/ # bash
sh: bash: not found
/ # python
sh: python: not found
/ # perl
sh: perl: not found
/ # ruby
sh: ruby: not found
Sure, you can install all of these with a single `apk add`, but it makes your container much fatter, i.e. every CI job that has to pull the image will be taking a longer time. Same for when you push the image into a far-away datacenter.Just use make. It's not hard and it works even for fairly large projects.
Array is the only one that I have found lacking, in my experience.
Look at how a modern build system (like qbs) organizes the build. It builds a declarative object graph describing the project and maps that to a dependency graph where each node can be a relatively complex object ("compile C++ file X using flags Y" or "link LargeSetOfFiles") annotated with modification data (like input file hashes). (Then it compares the dependency graph to what is found on the system and creates a list of commands to execute in order to bring whatever is on the system to the desired state, i.e. create an up to date build).
You can find a nice explanation in the "tup" build tool, although there are of course many others: http://gittup.org/tup/
And yes, you can express DAGs with text and/or filesystem operations (plus symlinks), but not efficiently and writing code that operates on that level is cumbersome.
$ cat > f
a c
a d
b c
^D
$ tsort f
a
b
d
cIs there any similar build system? I know of https://github.com/droundy/fac, but it's not cross-platform
1) reasonably easy to use 2) very fast 3) very correct
Most build systems fail 3), usually 2) and often also 1).
https://news.ycombinator.com/item?id=15043633
debug/release, internationalized builds, coverage builds, profile-directed feedback, running parameterized test suites, etc.
To my knowledge, today every Unix system has Python, usually at least 2.7, if not Python 3. Some even replaced most of their system shell scripts with Python scripts. (Formerly, Perl had this status, but never really caught on in that area.)
Python is a much cleaner language than any shell language, especially with regard to error handling. (yes, I'm aware of "set -eu") Also, if you occationally need some more elaborated data structures or algorithms, you can express these in a straight forward way, rather than a series of complicated (and usually very fragile) text processing steps.