Getting Started

Getting started with tup is easy. Just follow these 7 steps:

  1. Download and build tup.
  2. Make sure the tup executable is in your path.
  3. Make sure your source files are backed up, like in source control, or something. Tup is able to delete old files automatically, though it tries to prevent you from doing silly things like overwrite your hand-written C files. Still, it would suck if you got boned because tup has a bug or something. Hey, your hard disk can go at anytime, too.
  4. Go to the top of your source tree and type tup init. This will create a .tup/ directory that is used to store dependencies and manage the build system.
  5. Write a Tupfile to build things. It's probably easiest to start with a single rule and expand from there. You don't save anything by writing everything up front and trying to get it right the first time. Feel free to take a look at the examples to get an idea of how to write them.
  6. Perform a build by running tup upd. You can run this from anywhere in the source tree. This will always update the whole tree. You can't fake out tup by trying to build a part of your program if you run upd in a subdirectory or something. Don't even try. You can't win. Unless you want to update a single target at a time, like tup upd foo.o, in which case tup will just build that. But, tup will always take the ramifications of the whole project space into consideration, not just the subdirectory that you're in.
  7. Now you just edit your source files, Tupfiles, or whatever and run tup upd when you're done.