blob: c69e89cf55e89c19fbf4865b5a0543bfc3a0637c [file] [log] [blame]
Matthias Andreas Benkardf59e0972018-04-10 22:01:34 +02001# Copyright 2015 Andrew Gottemoller.
2#
3# This software is a copyrighted work licensed under the terms of the
4# Weld license. Please consult the file "WELD_LICENSE" for
5# details.
6
7# This makefile defines utility functions used throughout weld
8
9
10# Print only if the user specified "show_progress=1"
11print_progress = $(if $(show_progress),@$(call print,$(1)),)
12
13# Print only if the user specified "debug_weld=1"
14debug_info = $(if $(debug_weld),$(info debug-weld: $(1)),)
15
16# Print an component definition related error message and stop the build
17def_error = $(error $(def_file): $(1))
18
19# Convert a component definition file to the components root path
20def_file_to_root_path = $(patsubst %/$(def_file_name),%,$(1))
21
22# Check if any values in a list contain a specific character
23list_contains_char = $(if $(filter-out $(words $(1)) 0, $(words $(subst $(2), ,$(1)))),1,)