Dependency Tracking

When you run the compiler you can optionally specify a file that is used to store dependency information for all the files being compiled. In a large project this allows the compiler to intelligently avoid recompiling files that have not changed since the last compilation.

The way in which you specify the dependencies file depends upon the invocation method. From the command line, use the -deps or -dependencies options. If invoking the compiler from Ant then add the dependencies attribute to the rsp task as demonstrated in Example 2.1, “Invoking the Compiler from Apache Ant”.

The dependencies file is updated each time the compiler is run. If it does not exist then it is created. It lists each target file and the source files that are required to build it. When asked to build a target that already exists, the compiler will first check the dependencies file to see if any of the source files for that target have changed since it was built. If not then the target need not be rebuilt.

It is recommended that you use dependencies files for projects with more than one source file. The suggested naming convention is dependencies.rspd.