additional changes
This commit is contained in:
@@ -4,6 +4,20 @@
|
||||
# `api-*` convenience targets).
|
||||
|
||||
CARGO ?= cargo
|
||||
ROOT := ..
|
||||
|
||||
# Normalize API_ENV_FILE / API_DESI_DATA (given relative to the repo root) to
|
||||
# absolute paths so the API process can open them regardless of its working
|
||||
# directory. "override" is required because they are usually passed as
|
||||
# command-line/env vars, which would otherwise override any assignment here.
|
||||
define normalize_path
|
||||
ifdef $1
|
||||
ifneq ($(abspath $($1)),$($1))
|
||||
override $1 := $(abspath $(ROOT)/$($1))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
$(foreach v,API_ENV_FILE API_DESI_DATA,$(eval $(call normalize_path,$v)))
|
||||
|
||||
.PHONY: help setup run build test check fmt clean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user