diff --git a/wscript b/wscript index 16820d49f..3123e1672 100644 --- a/wscript +++ b/wscript @@ -749,7 +749,19 @@ def build(bld): env = bld.env if Options.options.check_profile: - print("Build profile: %s" % Options.options.build_profile) + # Parse the waf lockfile generated by latest 'configure' operation + lockfile = os.environ.get('WAFLOCK', '.lock-waf_%s_build' % sys.platform) + profile = "not found" + with open(lockfile, "r") as f: + for line in f: + if line.startswith("options ="): + key, val = line.split('=') + arr = val.split(',') + for x in arr: + optkey,optval = x.split(':') + if (optkey.lstrip() == '\'build_profile\''): + profile = str(optval.lstrip()).replace("'","") + print("Build profile: %s" % profile) raise SystemExit(0) return