git subrepo clone https://github.com/agottem/weld.git weld

subrepo:
  subdir:   "weld"
  merged:   "d0cd07b"
upstream:
  origin:   "https://github.com/agottem/weld.git"
  branch:   "master"
  commit:   "d0cd07b"
git-subrepo:
  version:  "0.3.1"
  origin:   "???"
  commit:   "???"

Change-Id: I109553651e97fd93e00aa555d171ca9d04ce8585
diff --git a/weld/utils.mk b/weld/utils.mk
new file mode 100644
index 0000000..c69e89c
--- /dev/null
+++ b/weld/utils.mk
@@ -0,0 +1,23 @@
+# Copyright 2015 Andrew Gottemoller.
+#
+# This software is a copyrighted work licensed under the terms of the
+# Weld license.  Please consult the file "WELD_LICENSE" for
+# details.
+
+# This makefile defines utility functions used throughout weld
+
+
+# Print only if the user specified "show_progress=1"
+print_progress = $(if $(show_progress),@$(call print,$(1)),)
+
+# Print only if the user specified "debug_weld=1"
+debug_info = $(if $(debug_weld),$(info debug-weld: $(1)),)
+
+# Print an component definition related error message and stop the build
+def_error = $(error $(def_file): $(1))
+
+# Convert a component definition file to the components root path
+def_file_to_root_path = $(patsubst %/$(def_file_name),%,$(1))
+
+# Check if any values in a list contain a specific character
+list_contains_char = $(if $(filter-out $(words $(1)) 0, $(words $(subst $(2), ,$(1)))),1,)