Overview of Project Source Trees

A project source tree is the directory that contains the source files for your project. The source tree can also contain multiple subdirectories, that each contain source files for individual components of your project.

When the Build utility builds your project, it scans the directory and subdirectories of your project source tree and creates a list of the work that is required to build the project. Starting at the root of your project source tree, the Build utility scans each directory and subdirectory in order to determine the following:

  • A directory that contains a Sources file and information about how to build a part of the project. Such a directory is called a leaf node. If the Build utility determines that the directory is a leaf node, it will not scan any other subdirectories that are nested within the leaf node.

    The following figure shows a project source tree that contains multiple leaf nodes and a single subtree.

    Diagram illustrating a project source tree that contains multiple leaf nodes and a single subtree

  • A directory that has a Dirs file might contain subdirectories. In this case, the Build utility treats the directory as the root of a source subtree. If the Build utility finds a Dirs file in a directory, it uses information in the DIRS and OPTIONAL_DIRS macros in the file to identify the additional subdirectories to scan for leaf nodes or subtrees.

    The following figure shows a project source tree that contains multiple leaf nodes and subtrees.

    Diagram illustrating a project source tree that contains multiple leaf nodes and subtrees

After the scan is complete, the Build utility starts the NMAKE utility (Nmake.exe) to build the source files within each leaf node of your project source tree.

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011