about summary refs log tree commit diff stats
path: root/029tools.cc
diff options
context:
space:
mode:
Diffstat (limited to '029tools.cc')
-rw-r--r--029tools.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/029tools.cc b/029tools.cc
index 2a52cb2e..cb24fd85 100644
--- a/029tools.cc
+++ b/029tools.cc
@@ -325,3 +325,21 @@ case _LOG: {
   LOG << out.str() << '\n';
   break;
 }
+
+//: set a variable from within mu code
+//: useful for selectively tracing or printing after some point
+:(before "End Globals")
+bool Foo = false;
+:(before "End Primitive Recipe Declarations")
+_FOO,
+:(before "End Primitive Recipe Numbers")
+put(Recipe_ordinal, "$foo", _FOO);
+:(before "End Primitive Recipe Checks")
+case _FOO: {
+  break;
+}
+:(before "End Primitive Recipe Implementations")
+case _FOO: {
+  Foo = true;
+  break;
+}
/a> 113 114 115 116 117 118