Share via


Dependency Side Effects

If a target is specified with a colon (:) in two dependency lines in different locations, and if commands appear after only one of the lines, NMAKE interprets the dependencies as if adjacent or combined. It does not invoke an inference rule for the dependency that has no commands, but instead assumes that the dependencies belong to one description block and executes the commands specified with the other dependency.

This...

...is evaluated as this

bounce.exe : jump.obj
   echo Building 
bounce.exe...
bounce.exe : up.obj
bounce.exe : jump.obj 
up.obj
   echo Building 
bounce.exe...

This effect does not occur if a double colon (::) is used.

This...

...is evaluated as this

bounce.exe :: jump.obj
   echo Building 
bounce.exe...
bounce.exe :: up.obj
bounce.exe : jump.obj
   echo Building 
bounce.exe...
bounce.exe : up.obj
# invokes an inference rule

See Also

Concepts

Targets