Matthias Andreas Benkard | f59e097 | 2018-04-10 22:01:34 +0200 | [diff] [blame^] | 1 | # 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" |
| 11 | print_progress = $(if $(show_progress),@$(call print,$(1)),) |
| 12 | |
| 13 | # Print only if the user specified "debug_weld=1" |
| 14 | debug_info = $(if $(debug_weld),$(info debug-weld: $(1)),) |
| 15 | |
| 16 | # Print an component definition related error message and stop the build |
| 17 | def_error = $(error $(def_file): $(1)) |
| 18 | |
| 19 | # Convert a component definition file to the components root path |
| 20 | def_file_to_root_path = $(patsubst %/$(def_file_name),%,$(1)) |
| 21 | |
| 22 | # Check if any values in a list contain a specific character |
| 23 | list_contains_char = $(if $(filter-out $(words $(1)) 0, $(words $(subst $(2), ,$(1)))),1,) |