What is tup?
Tup is a file-based build system for Linux, OSX, and Windows. It inputs a list of file changes and a directed acyclic graph (DAG), then processes the DAG to execute the appropriate commands required to update dependent files. Updates are performed with very little overhead since tup implements powerful build algorithms to avoid doing unnecessary work. This means you can stay focused on your project rather than on your build system.
$ git clone git://github.com/gittup/tup.git $ cd tup tup$ ./bootstrap.sh tup$ man ./tup.1
If you don't want to install tup from the git tree, you can use the unofficial tup PPA repository that works for Debian-based distributions (e.g. Ubuntu 10.04+).
sudo apt-add-repository 'deb http://ppa.launchpad.net/anatol/tup/ubuntu precise main' sudo apt-get update sudo apt-get install tup
If you use the Homebrew package manager you can install tup as follows:
brew cask install osxfuse brew install tup
If you use MacPorts install tup as:
sudo port install tup
You can use tup anywhere you would use another build system (like make, or any of its derivatives). One reason you would want to use tup is if you like to update things very quickly. For example, if you typically execute a build in a subdirectory because it takes too long to figure out what to do when you execute the build from the top, you might want to look into tup. Unfortunately, tup is so fast that your chair mounted jousting might suffer. I apologize in advance if someone besmirches your honor and you are unable to properly defend yourself as a result.
Nothing much, just writing some web pages. What's up with you?
Why is it so awesome?
- It is very fast.
- It will automatically clean-up old files.
- It will detect if your build description isn't parallel-safe, and tell you.
What this means is:
- Your edit/compile/test cycle is quick, even if your project is large. You just run: tup
- You don't have to outsmart your build system by starting it in a subdirectory to make it go faster. Anywhere in the tree: tup
- Your version control lets you rename a file. Does your build system? tup
- Fresh checkouts: gone.
'clean' builds: gone.
What remains: tup
How is it so awesome?
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. See how the dependencies differ in make and tup:
See the difference? The arrows go up. This makes it very fast. In fact, in at least one case, tup is optimal. See the Build System Rules and Algorithms (PDF) paper for more detailed information.