Explicit commands are contained in the command block that follows a target/dependency statement. It is the block of commands that will be executed if the target needs updating.

Example:

targ.obj :  program.c            #  Target / dependency statement
  icc /c /Fotarg.obj program.c

Whenever there is an explicit command associated with a target/dependency statement, inference rule processing is not attempted.

Paths may be specified for targets and dependents. A target file in the specified target directory will be built or updated if the dependent is found in the specified directory.

When paths are specified in curly braces on file specifications, the default is to use the local directory. If a file is not found that matches the file specification in the local directory, then the path in curly braces (or paths, separated by semicolons) is searched in the order given.

A file can be both a target and a dependent in a description file. If the file is specified with curly brace paths in any instance, all instances of that file must contain the same curly brace paths. If the file is not specified the same way in all instances, it will be treated as a different file specification.

When specifying multiple search paths in curly braces on targets and dependents, the paths are specified in the following manner:

{p1;p2;p3} targ.obj : {p4;p5;p6} dep.c   # Multiple paths in curly braces
    $(CC) -c -Fo$@ $<                    # Explicit rule for target/dependency

File specifications can be combined with relative path specifiers to modify the local directory or to modify the paths in curly braces. The relative path specifier is included on the file specification. The relative path specification works in OS/2 in the following manner:

cd e:\os2\system\test     # executing this from the e: drive
                          # would locate you in the specified
                          # directory

dir ..\..\filename.txt    # This file specification includes a
                          # relative path specification.  It
                          # will look for filename.txt in the os2
                          # directory

.PATH macro processing is used to search for unlocatable files after any applicable curly brace paths have been processed. .PATH searches are applied if the unlocatable files match the .PATH macro extensions and do not have a path or relative path included in their file specification. The .PATH macro processing method of searching for files works only with target/dependency statements that have an explicit rule.

.PATH processing functions similar to explicit curly brace processing in that it will use the first file it finds, starting with the .PATH processing functions similar to explicit curly brace processing in that it will use the first file it finds, starting with the local directory and then searching the paths specified by .PATH.

For more information on the .PATH macro, see Predefined Macros.


[Back] [Next]