diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-03 16:35:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-03 16:35:17 +0200 |
commit | 073838d6f0d7846dc537bf1d0308392a79320f06 (patch) | |
tree | 006f56f52c502f9179898e1a25e21b6a673d76cd /build2/install/module.cxx | |
parent | 5f010bb45851d335136369e70f71903c394e9a48 (diff) |
Add support for preserving subdirectories when installing
This is handy, for example, when installing headers:
install.include = $install.include/foo
install.include.subdirs = true
The base for calculating the subdirectories is the scope where the
subdirs value is set.
Diffstat (limited to 'build2/install/module.cxx')
-rw-r--r-- | build2/install/module.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build2/install/module.cxx b/build2/install/module.cxx index 89b8a96..ad2af6c 100644 --- a/build2/install/module.cxx +++ b/build2/install/module.cxx @@ -95,6 +95,10 @@ namespace build2 set_var<string> (s, r, n, ".sudo", (string*) (nullptr)); set_var<path> (s, r, n, ".cmd", c.empty () ? nullptr : &c); set_var<strings> (s, r, n, ".options", (strings*) (nullptr)); + + // This one doesn't have config.* value (only set in a buildfile). + // + var_pool.insert<bool> (string ("install.") + n + ".subdirs"); } static alias_rule alias_; |