A First Tupfile
In this example, we'll create a small C program using tup. The program itself will be completely useless, but hopefully you can use your imagination to see how you might use tup in a real project. Let's start with a typical "Hello, world!" in C. Since we're using tup, you'll want to run tup init at the top of the project, which in this example will be the tup_test directory.
Tup handles dependencies a little differently from other build systems. In this example, we'll show how the dependencies that you specify in a Tupfile work together with the dependencies determined automatically during the program's execution.
Auto-generated Header File
Here we will show how to write a Tupfile to handle a fairly common use-case: an automatically generated header file.
Tupfiles in Multiple Directories
Now our program grows beyond the confines of a single directory. Here we'll see how Tupfiles can share variables and :-rules.