4 ms·
My $0.02 on Tup: First of all, I cannot express how much more I like it than make. If Tup is an option, I will use it. What it does well: 1) It prevents you
by aidenn0 10y ago
My $0.02 on Tup:
First of all, I cannot express how much more I like it than make. If Tup is an option, I will use it.
What it does well:
1) It prevents you from making dependency mistakes: it hooks into the FS layer using fuse and tracks all input and output files that are inside your build directory. If you make any mistakes that could cause a future incremental build to be improper, it errors out rather than continuing.
2) It is opinionated about how your project should be structured. This has some negatives if you are trying to duplicate a particular structure from Make, but all in all does guide you in the right direction.
3) There isn't a lot of syntax to learn. This is good because the syntax is very different from anything else I've used.
#1 is really the killer feature for me; the amount of time I want to spend debugging makefiles is just slightly less than zero.
What it doesn't do, but I'm not bothered by:
Tup literally only manages commands that have 1 or more inputs and one or more outputs, and which must be run IFF the inputs have changed or the outputs do not exist; the outputs must be within the hierarchy of the project.
1) Configuration must be done before Tup is launched
2) Anything you might use a .PHONY for in make needs to be done outside of tup
3) Install commands must be done outside of tup.
This means that configuring, installing &c. must be done outside of tup.
I find that having a make file that handles the above 3 steps works fine; others using tup tend to use a shell script.
What it doesn't do that I wish it did:
1) No clean command; I currently work around this by having it generate .gitignore file and git clean -X; still it's annoying that this isn't possible.
2) It does not handle paths with spaces. This is actually safe as it enforces relative paths, so if it works on your system it should work everywhere even if the project is unpacked to a path with spaces.