Tup's main problem is it's unusual, and it doesn't have a library of build rules. But it's fast! On a related note, I've always wondered if it was possible to have a build system based on dynamic library injection / strace. The idea would be that you just write your build rules in shell script. Then, you run it with a special shell that catches open(), etc. in child processes (via library injection, etc). These syste…
See fabricate.py: https://github.com/SimonAlfie/fabricate Here's an earlier comment I wrote about it, which is also in the middle of a discussion about Tup, funnily enough: https://news.ycombinator.com/item?id=4190804 I'm still using Fabricate quite happily today for personal projects in a variety of languages, though I've come to realise that the main downside of it is that programs run slower under strace - a typic…
Tup – A file-based build system for Linux, OS X, and Windows
51–60 of 110 posts
Re: Tup – A file-based build system for Linux, OS X, and Windows
#52The index page makes it sound like a parody of something, took me a while to figure it is functional software.
"In a typical build system, the dependency arrows go down. Although this is the way they would naturally go due to gravity, it is unfortunately also where the enemy's gate is. This makes it very inefficient and unfriendly. In tup, the arrows go up. This is obviously true because it rhymes."
Re: Tup – A file-based build system for Linux, OS X, and Windows
#53Re: Tup – A file-based build system for Linux, OS X, and Windows
#54How does it handle building from LaTeX sources where you need to "rebuild" the document multiple times to get page numbers and references right?
Re: Tup – A file-based build system for Linux, OS X, and Windows
#55Re: Tup – A file-based build system for Linux, OS X, and Windows
#56Tup's main problem is it's unusual, and it doesn't have a library of build rules. But it's fast! On a related note, I've always wondered if it was possible to have a build system based on dynamic library injection / strace. The idea would be that you just write your build rules in shell script. Then, you run it with a special shell that catches open(), etc. in child processes (via library injection, etc). These syste…
See fabricate.py: https://github.com/SimonAlfie/fabricate Here's an earlier comment I wrote about it, which is also in the middle of a discussion about Tup, funnily enough: https://news.ycombinator.com/item?id=4190804 I'm still using Fabricate quite happily today for personal projects in a variety of languages, though I've come to realise that the main downside of it is that programs run slower under strace - a typic…
However, using Make + ccache + a custom ar wrapper (port the deterministic flags from Linux to BSD), I got all the speed up of tup/fabricate, using off-the-shelf open source tooling. I've never looked back.
Re: Tup – A file-based build system for Linux, OS X, and Windows
#57Is tup capable of building out of tree? By this I mean having: project_1/src/main.c project_1/src/something/a.c project_1/src/something/a.h Is there some way for tup to manage discovering the files to build and everything else needed or will I need to add every file path in manually like make?
> "some way for tup to manage discovering the files to build"
Well, no. It's not a "convention" build tool like rust's `cargo` where you just place things in the default locations and it figures it out.
You can use the `run ./script args` mechanism in tup to run your own script that emits tup rules, though.
The manual has details: http://gittup.org/tup/manual.html
Re: Tup – A file-based build system for Linux, OS X, and Windows
#58How does it handle building from LaTeX sources where you need to "rebuild" the document multiple times to get page numbers and references right?
Instead of plugging latex directly into a Makefile or tup, use such a wrapper.
It seems that latexmk could be such a script: http://mirror.unl.edu/ctan/support/latexmk/README
Re: Tup – A file-based build system for Linux, OS X, and Windows
#59Earlier quoted context omitted.
What about kqueue or eventports?
Kqueue and OS X's file watcher thing are worse than inotify. They give inexact reports of changes, so you have to do a bunch of manual scanning afterwards. I really don't understand the grandparent's gripe. Inotify scales well, supports race free "watch a whole directory tree", and has a nice API.
The limit exists because there is a ~1KiB kernel memory overhead per watch (though there should really be a way for them to take part in normal memory accounting per-process).
If one wants to watch a directory tree, one needs an inotify watch handle per subdirectory in that tree. On large trees (or if more than 1 process is using inotify), that number of watches can be exceeded.
As lots of folks are looking for recursive watches, they aren't happy with needing to allocate & manage a bunch of handles when they see what they want as a single item.
That said, I'm not sure the way the kernel thinks about fs notifications internally would allow a single handle recursive watch at the moment.
In any case, the amount of info one can obtain by using fuse (or any fs like nfs or 9p) to intercept filesystem accesses is a bit larger. At the very least, one can (in most cases) directly observe the ranges of the file that were modified (though that's not quite so important for tup, afaik). There also aren't any queue overruns (which can happen in inotify) because one will just slow the filesystem operations down instead (whether this is desirable or not depends on the application).
Re: Tup – A file-based build system for Linux, OS X, and Windows
#60Earlier quoted context omitted.
What about kqueue or eventports?
Kqueue and OS X's file watcher thing are worse than inotify. They give inexact reports of changes, so you have to do a bunch of manual scanning afterwards. I really don't understand the grandparent's gripe. Inotify scales well, supports race free "watch a whole directory tree", and has a nice API.