aboutsummaryrefslogtreecommitdiff
path: root/scripts/shared
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-11 13:44:31 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-11 13:44:31 +0200
commit745b4e28338ae1564c8e3fb2cc821723ab9752db (patch)
treedd286a70439d86458795dda3b67c9af2fc974b67 /scripts/shared
parent1f670483bff9e7a588fe90a7ec98b8950c1c13de (diff)
downloadlinux-conf-perf-745b4e28338ae1564c8e3fb2cc821723ab9752db.tar.gz
linux-conf-perf-745b4e28338ae1564c8e3fb2cc821723ab9752db.tar.bz2
linux-conf-perf-745b4e28338ae1564c8e3fb2cc821723ab9752db.zip
macros.h moved to shared folder
Diffstat (limited to 'scripts/shared')
-rw-r--r--scripts/shared/macros.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/shared/macros.h b/scripts/shared/macros.h
new file mode 100644
index 0000000..95bb16f
--- /dev/null
+++ b/scripts/shared/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 */