aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/build-config.cxx11
-rw-r--r--mod/build-config.hxx9
2 files changed, 16 insertions, 4 deletions
diff --git a/mod/build-config.cxx b/mod/build-config.cxx
index b11d7ea..6f2bc43 100644
--- a/mod/build-config.cxx
+++ b/mod/build-config.cxx
@@ -318,6 +318,17 @@ namespace brep
}
}
+ // Append the trailing slash to match the resulting paths as directories.
+ // This is required for the trailing /* we could append to match absent
+ // directory path components (see path_match_flags::match_absent for
+ // details).
+ //
+ // Note that valid dash components may not contain a trailing dash.
+ // Anyway, any extra trailing slashes will be ignored by the path
+ // constructor.
+ //
+ r += '/';
+
return path (move (r));
}
}
diff --git a/mod/build-config.hxx b/mod/build-config.hxx
index 17fd6af..6eece1d 100644
--- a/mod/build-config.hxx
+++ b/mod/build-config.hxx
@@ -83,10 +83,11 @@ namespace brep
// Convert dash-separated components (target, build configuration name,
// machine name) or a pattern thereof into a path, replacing dashes with
- // slashes (directory separators) and `**` with `*/**/*`, for a subsequent
- // match using the path_match() functionality (the idea here is for
- // `linux**` to match `linux-gcc` which is quite natural to expect). Throw
- // invalid_path if the resulting path is invalid.
+ // slashes (directory separators), `**` with `*/**/*`, and appending the
+ // trailing slash for a subsequent match using the path_match()
+ // functionality (the idea here is for `linux**` to match `linux-gcc` which
+ // is quite natural to expect). Throw invalid_path if the resulting path is
+ // invalid.
//
// Note that the match_absent path match flag must be used for the above
// `**` transformation to work.