OPTIONAL_DIRS Keyword (.dirs File) (Compact 2013)
This keyword specifies an optional set of directories in which Build.exe looks for a dirs or sources file when you explicitly request the directory.
OPTIONAL_DIRS=directory [ directory ]...
The optional directory in which Build.exe searches for a dirs or sources file.
There are two ways to explicitly direct Build.exe to search optional directories. If Proj3 and Proj4 are defined in an OPTIONAL_DIRS entry, you can do either of the following tasks:
Include the directory names on the Build.exe command line.
build Proj3 Proj4
- or -
Set the BUILD_OPTIONS environment variable to include the names of the optional directories to be built.
set BUILD_OPTIONS=Proj3 Proj4 build
You can use a dirs file to exclude directories in the source code tree from the build process.
For example, to exclude the Proj2 directory from the build, modify the MyProj\Dirs file so that it lists only the Proj1 subdirectory. Use the OPTIONAL_DIRS keyword to designate optional directories.
If OPTIONAL_DIRS is defined, Build.exe builds the code in the Proj3 and Proj4 subdirectories under the current directory only as described in the following explanation.
DIRS= \ Proj1 \ Proj2 OPTIONAL_DIRS=Proj3 Proj4