
The Tup Build System - timtadh
http://gittup.org/tup/
======
skybrian
Reversing the arrows looks pretty silly at first, but apparently the idea is
that if you start with the files that changed, you can read partial dependency
graphs and start building any downstream dependencies that changed before the
entire build graph is loaded. If you start from the top down, you have to load
and compute the entire dependency graph up front.

This will matter for large build systems where just loading the build files
takes significant time. Another way to solve it is just to make loading the
build file very fast so that it's a non-issue, which is what ninja [1] does.

Apparently there's some influence: "There are many other build systems that
are more user-friendly or featureful than Ninja itself. For some
recommendations: the Ninja author found the tup build system influential in
Ninja’s design, and thinks redo's design is quite clever." [2]

[1] [http://martine.github.io/ninja/](http://martine.github.io/ninja/) [2]
[http://martine.github.io/ninja/manual.html](http://martine.github.io/ninja/manual.html)

~~~
dima55
Every time tup comes up, there's a question I have that nobody seems to know
the answer to: how does tup know what changed? Make does this by starting from
what it needs to build (which it knows) and traversing the dependencies. Does
tup have some sort of daemon that monitors the file system? What if the file
system isn't local (NFS, say)?

~~~
xt
It uses inotify for file systems that supports it.

~~~
dima55
So then it DOES have a daemon? Have you actually tried it? And inotify doesn't
work over NFS.

------
codemac
I used this tool in a very large engineering org (100+ engineers on the same
project), and it really held up for our C and C++. I highly recommend this
tool for anyone considering what to do about builds with c/c++ and don't want
to hassle with overwrought things like waf or scons.

------
burke
Related reading:
[https://github.com/apenwarr/redo](https://github.com/apenwarr/redo)

~~~
jb55
We have been using redo for the longest time until parallel builds broke on
Mavericks. The project basically has 0 maintainers so we had to switch off of
it. It's a shame because redo was pretty great while it worked.

~~~
burke
It's probably not hard to fix; the codebase is tiny. I've been looking for an
excuse to use it, but none has surfaced, since the only compiled language I
use at work is Go.

------
hardwaresofton
Skeptical at first, but it certainly introduces an interesting build tool that
seems very easy to understand.

I particularly liked tup monitor - grunt-like functionality for C code is
awesome.

Comparison to make is impressive:
[http://gittup.org/tup/make_vs_tup.html](http://gittup.org/tup/make_vs_tup.html)

------
salmonellaeater
Technical merits aside, 'tup'[1][2] is a poor choice for the name, especially
since it's hosted on a site that includes 'git'[3][4] in the URL. It would be
difficult to talk about the tool professionally without risking offending
someone.

[1] [http://www.shakespeare-
navigators.com/othello/T11.html](http://www.shakespeare-
navigators.com/othello/T11.html)

[2]
[https://www.google.com/search?q=define:tup](https://www.google.com/search?q=define:tup)

[3]
[https://git.wiki.kernel.org/index.php/GitFaq#Why_the_.27Git....](https://git.wiki.kernel.org/index.php/GitFaq#Why_the_.27Git.27_name.3F)

[4]
[https://www.google.com/search?q=define:git](https://www.google.com/search?q=define:git)

------
dezgeg
The one thing I really miss in Tup is the '* * ' glob, i.e. '* ' that also
recurses through subdirectories.

Other than that, it's great. I was able to replace my C++ project's (utilizing
generated sources and headers and other nontrivial things) custom-written and
brittle makefiles (of 100-ish lines) with under ten lines of Tup.

------
Nimi
See here for a comparison of various build systems, including tup:

[https://github.com/ndmitchell/build-
shootout#readme](https://github.com/ndmitchell/build-shootout#readme)

------
kolev
I've been using it for a couple of years now, but for simple projects, it's a
bit overcomplicated. In other words, it's a great tool for the right projects,
but not a silver bullet.

------
xt
I use tup in my web projects to monitor my folders for things to "compile".
This includes CoffeScript, MoonScript, SASS/SCSS, Less and more. Very fast and
painless.

------
serve_yay
> This means you can stay focused on your project rather than on your build
> system.

Is this more important or less important than all the stuff about directed
acyclic graphs before it? Sheesh.

