From 9964a9aca03b38c2959994e0fdc91014da252cb8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 20 Nov 2017 13:11:59 +0200 Subject: Implement dump directive It can be used to print (to stderr) a human-readable representation of the current scope or a list of targets. For example: dump # Dump current scope. dump lib{foo} details/exe{bar} # Dump two targets. This is primarily useful for debugging as well as to write build system tests. --- build2/dump.hxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'build2/dump.hxx') diff --git a/build2/dump.hxx b/build2/dump.hxx index e456540..8330708 100644 --- a/build2/dump.hxx +++ b/build2/dump.hxx @@ -8,14 +8,21 @@ #include #include -#include - namespace build2 { - // Dump the state pertaining to the current action. + class scope; + class target; + + // Dump the build state to diag_stream. // void dump (); + + void + dump (const scope&, const char* ind = ""); + + void + dump (const target&, const char* ind = ""); } #endif // BUILD2_DUMP_HXX -- cgit v1.1