Document phony targets - close #141

This commit is contained in:
Josh Holtrop 2021-12-01 23:00:12 -05:00
parent 19dbab3426
commit 4548f4e3c9

View File

@ -821,6 +821,22 @@ allows it to be used to create a shared library are added.
Although it can be called explicitly, it is more commonly implicitly called by Although it can be called explicitly, it is more commonly implicitly called by
the `SharedLibrary` builder. the `SharedLibrary` builder.
###> Phony Targets
rscons supports phony build targets.
Normally, a builder produces an output file, and executes whenever the input
files or command have changed.
A phony build target can be used to register a builder that does not produce
an output file.
A custom builder can take some action when the input files change even if it
does not produce an output file.
Such a builder could perform verification or run a test on its source files,
possibly failing if some conditions are not met.
It could also simply output something to the console, such as an analysis of
the source file, whenever it changes.
A phony target is signified by passing a Symbol instead of a String as the
first parameter (target) to a builder method.
###> Explicit Dependencies ###> Explicit Dependencies
A target can be marked as depending on another file that Rscons would not A target can be marked as depending on another file that Rscons would not