Share via


Dependency Side Effects

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at 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. For example, this set of rules:

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

is evaluated as this:

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

This effect does not occur if a double colon (::) is used. For example, this set of rules:

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

is evaluated as this:

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

See Also

Targets