aboutsummaryrefslogtreecommitdiff
path: root/scripts/parse_kconfig/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/parse_kconfig/macros.h')
-rw-r--r--scripts/parse_kconfig/macros.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/parse_kconfig/macros.h b/scripts/parse_kconfig/macros.h
new file mode 100644
index 0000000..95bb16f
--- /dev/null
+++ b/scripts/parse_kconfig/macros.h
@@ -0,0 +1,11 @@
+extern int verbose_level; // Defined in kconfig_parser.c
+
+#define Eprintf(...) fprintf(stderr, __VA_ARGS__)
+#define Wprintf(...) if (verbose_level > 1) printf(__VA_ARGS__)
+#define Iprintf(...) if (verbose_level > 2) printf(__VA_ARGS__)
+
+#ifndef DEBUG
+#define Dprintf(...)
+#else
+#define Dprintf(...) if (verbose_level > 3) printf(a, __VA_ARGS__)
+#endif /* DEBUG */