Skip to content

Instantly share code, notes, and snippets.

@gabrielschulhof
Last active February 16, 2016 16:24
Show Gist options
  • Save gabrielschulhof/694a9f8da3a116754044 to your computer and use it in GitHub Desktop.
Save gabrielschulhof/694a9f8da3a116754044 to your computer and use it in GitHub Desktop.
diff --git a/data/scripts/dependency-resolver.py b/data/scripts/dependency-resolver.py
index 446f5ae..e9ce9a7 100755
--- a/data/scripts/dependency-resolver.py
+++ b/data/scripts/dependency-resolver.py
@@ -267,6 +267,15 @@ def handle_exec_check(args, conf, context):
exit(1)
path = which(exe)
+
+ if not bool(path):
+ fallback_exec = conf.get("fallback_exec", [])
+ if len(fallback_exec) > 0:
+ makefile_var_match = fallback_exec[0].match("\$\(([^)]*)\)$)
+ if makefile_var_match:
+ fallback_exec[0] = context.find_makefile_var(makefile_var_match.group(1))
+ path = run_command(" ".join(fallback_exec), context)
+
required = conf.get("required")
success = bool(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment