DEP: A Tool for Maintaining Software-Build Dependencies

The process of translating a software system's source files into an executable file is typically implemented by a tool named Make. Make reads a makefile, which expresses dependencies between a software system's files. Make also examines the time-of-last-modification (TOLM) attribute of files named in the makefile. As far as Make is concerned, the makefile is maintained manually. DEP is a tool for automatically maintaining a makefile.

DEP processes depfiles. The language of depfiles is a subset of that of makefiles. A depfile contains a textual description of a set of dependencies, each of which expresses that a target file depends on a set of prerequisites. A user is not expected to edit a depfile. Rather, a depfile allows dependencies computed during an execution of DEP to be used during the next execution of DEP.

A set of prerequisites can be partitioned into a primary file, a set of secondary files, and a set of preprocessor macros. For example, target main.obj may have a primary prerequisite of main.c, secondary prerequisites of a.h and c.h, and a macro prerequisite of AnotherOption (defined in opts.h).

DEP performs the following functions:

Make can read a depfile, as part of a makefile.