summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-11 23:33:05 +0100
committerwm4 <wm4@nowhere>2015-03-11 23:33:05 +0100
commit8a4239e0c215a3fb039b34134f6aac70e2977169 (patch)
tree8a75eaf2dbcb93cde6bf3f8bd950198e552d3620
parent7e9c441d41ea0972641d1fb5ffddf2e11e46f23d (diff)
downloadmpv-8a4239e0c215a3fb039b34134f6aac70e2977169.tar.bz2
mpv-8a4239e0c215a3fb039b34134f6aac70e2977169.tar.xz
player: dump list of satisfied deps instead of config.h with -v
Starting to get tired of seeing the full config.h in verbose output every time. Make it slightly more elegant by outputting the list of satisfied dependencies instead.
-rw-r--r--player/main.c2
-rw-r--r--waftools/generators/headers.py12
2 files changed, 12 insertions, 2 deletions
diff --git a/player/main.c b/player/main.c
index 788977de8f..b85813a2f7 100644
--- a/player/main.c
+++ b/player/main.c
@@ -130,7 +130,7 @@ void mp_print_version(struct mp_log *log, int always)
// Only in verbose mode.
if (!always) {
mp_msg(log, MSGL_V, "Configuration: " CONFIGURATION "\n");
- mp_msg(log, MSGL_V, "config.h:\n%s\n", FULLCONFIG);
+ mp_msg(log, MSGL_V, "List of enabled features: %s\n", FULLCONFIG);
}
}
diff --git a/waftools/generators/headers.py b/waftools/generators/headers.py
index 0046cbf75d..546dd0344d 100644
--- a/waftools/generators/headers.py
+++ b/waftools/generators/headers.py
@@ -39,11 +39,21 @@ def __write_version_h__(ctx):
def __escape_c_string(s):
return s.replace("\"", "\\\"").replace("\n", "\\n")
+def __get_features_string__(ctx):
+ from inflectors import DependencyInflector
+ stuff = []
+ for dependency_identifier in ctx.satisfied_deps:
+ defkey = DependencyInflector(dependency_identifier).define_key()
+ if ctx.is_defined(defkey) and ctx.get_define(defkey) == "1":
+ stuff.append(dependency_identifier)
+ stuff.sort()
+ return " ".join(stuff)
+
def __add_mpv_defines__(ctx):
from sys import argv
ctx.define("CONFIGURATION", " ".join(argv))
ctx.define("MPV_CONFDIR", ctx.env.CONFDIR)
- ctx.define("FULLCONFIG", "\\n" + __escape_c_string(ctx.get_config_header()) + "\\n")
+ ctx.define("FULLCONFIG", __escape_c_string(__get_features_string__(ctx)))
def configure(ctx):
__add_mpv_defines__(ctx)