JamPlus manual
|
When the Header Scanning Variables are used, Jam scans source files for other files the source files might include. In order to speed this process up, both in the current run and subsequent runs of Jam, the dependency cache caches these scans, so the entire source tree need not be scanned each time Jam is run. This brings the following benefits:
The dependency cache also stores the md5 of the 'command line' (see rule UseCommandLine TARGETS : COMMANDLINE;) and the md5 of the content. In fact, neither facility will work properly if the dependency cache is not available.
In order to turn the Dependency Cache on, two variables must be set, DEPCACHE.cachename
and DEPCACHE
.
The actual name of the cache file is controlled by the DEPCACHE.cachename
. If DEPCACHE.cachename
is left unset (the default), reading and writing of a cache file is not performed. The cache is always used internally regardless of DEPCACHE.cachename
, which helps when HDRGRIST causes the same file to be scanned multiple times.
Setting LOCATE and SEARCH on the the DEPCACHE.cachename
works as well, so you can place anywhere on disk you like or even search for it in several directories. You may also set it in your environment to share it amongst all your projects.
The global DEPCACHE
variable sets the active dependency cache. DEPCACHE
defaults to the cachename of standard
. It can be overridden, if desired.
If the dependency cache needs to be changed for a target, the UseDepCache rule is used to override the global value.
There can be as many dependency caches as are needed by assigning additional DEPCACHE.cachename
file entries. The default dependency cache is known as standard. Generally, the standard cache refers to entries affected by the current platform and configuration. You might also have a platform cache attached to targets that are platform specific but not configuration specific. You might also have a global cache attached to targets that work for any platform or configuration.
You control the maximum age with the DEPCACHEMAXAGE variable. If set to 0, no cache aging is performed. Otherwise it is the number of times Jam must be run before an unused cache entry is purged. The default for DEPCACHEMAXAGE if left unset is 100.