mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
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.
7 lines
131 B
Makefile
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
|