From 4818fd10feb4c8c88656176c3e4de726a715c790 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 27 Mar 2014 12:02:46 -0400 Subject: [PATCH] README.md: add more details about Environment cloning --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf43196..41eff7a 100644 --- a/README.md +++ b/README.md @@ -261,10 +261,17 @@ An Rscons::Environment consists of: * a collection of targets to build * a collection of build hooks -When cloning an environment, the construction variables and builders are -cloned, but the new environment does not inherit any of the targets, build +When cloning an environment, by default the construction variables and builders +are cloned, but the new environment does not inherit any of the targets, build hooks, build directories, or the build root from the source environment. +The set of environment attributes that are cloned is controllable via the +`:clone` option to the `#clone` method. +For example, `env.clone(clone: :all)` will include construction variables, +builders, build hooks, build directories, and the build root. + +The set of pending targets is never cloned. + Cloned environments contain "deep copies" of construction variables. For example, in: