Getting Started
Getting started with tup is easy. Just follow these 7 steps:
- Download and build tup.
- Make sure the tup executable is in your path.
- 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.
- 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.
- 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.
- Perform a build by running tup. 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 tup 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 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.
- Now you just edit your source files, Tupfiles, or whatever and run tup when you're done.