Files
OpenNetworkLinux/make/templates.mk
Jeffrey Townsend 165009cd8d Add an error-checking template for Makefile shell calls onlpm --find-file.
Makefiles that call $(shell onlpm --find-file *) have always failed poorly
when the file cannot be found.

The onlp_find_file template can be called to both assign and check the
results. If an error occurred in getting the value then a Makefile error is raised.
2019-05-27 18:56:46 +00:00

7 lines
131 B
Makefile

define onlpm_find_file
$(1) := $$(shell $(ONLPM) --find-file $(2) $(3))
ifeq ($$($(1)),)
$$(error $(2):$(3) not found)
endif
endef