diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-23 15:56:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-23 15:56:03 +0200 |
commit | fefe0657f29b8db782f7a722dd46b074b991cf08 (patch) | |
tree | 62008e350c4f6048a68444fe50c47281643d276a /build/diagnostics | |
parent | 962cb1040670977085f0a187ecc6730608578151 (diff) |
Redo rule match/build logic
Now the rule is fully responsible for searching, matching, and building
of prerequisites.
Diffstat (limited to 'build/diagnostics')
-rw-r--r-- | build/diagnostics | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/build/diagnostics b/build/diagnostics index 7e56fa3..e61295a 100644 --- a/build/diagnostics +++ b/build/diagnostics @@ -14,8 +14,27 @@ #include <exception> #include <type_traits> +#include <build/path> + namespace build { + // Throw this exception to terminate the build. The handler should + // assume that the diagnostics has already been issued. + // + class failed: public std::exception {}; + + // In addition to calling relative_work(), this function also uses + // shorter notations such as ~/. + // + std::string + diag_relative_work (const path&); + + inline std::ostream& + operator<< (std::ostream& os, const path& p) + { + return os << diag_relative_work (p); + } + // Print process commmand line. // void @@ -27,11 +46,6 @@ namespace build print_process (args.data ()); } - // Throw this exception to terminate the build. The handler should - // assume that the diagnostics has already been issued. - // - class failed: public std::exception {}; - // Trace verbosity level. // // 1 - command lines to update explicit targets (e.g., .o) |