From 073838d6f0d7846dc537bf1d0308392a79320f06 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 3 Aug 2016 16:35:17 +0200 Subject: 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. --- build2/install/module.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build2/install/module.cxx') 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 (s, r, n, ".sudo", (string*) (nullptr)); set_var (s, r, n, ".cmd", c.empty () ? nullptr : &c); set_var (s, r, n, ".options", (strings*) (nullptr)); + + // This one doesn't have config.* value (only set in a buildfile). + // + var_pool.insert (string ("install.") + n + ".subdirs"); } static alias_rule alias_; -- cgit v1.1