From 9ca29346957e75ace44c4f8fbc04d7b56efba3ec Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 2 Mar 2016 13:33:00 -0500 Subject: [PATCH] document explicit dependencies --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index e00492a..77b8c10 100644 --- a/README.md +++ b/README.md @@ -394,6 +394,19 @@ not expected to be produced by the builder. Phony targets will still be "rebuilt" if any source or the command is out of date. +### Explicit Dependencies + +A target can be marked as depending on another file that Rscons would not +otherwise know about via the `Environment#depends` function. For example, +to force the linker to re-link a Program output when a linker script changes: + +```ruby +Rscons::Environment.new do |env| + env.Program("a.out", "foo.c", "LDFLAGS" => %w[-T linker_script.ld]) + env.depends("a.out", "linker_script.ld") +end +``` + ### Construction Variable Naming * uppercase strings - the default construction variables that Rscons uses