summaryrefslogtreecommitdiff
path: root/makext.mk
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-05-12 12:35:16 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-05-12 12:35:16 +0200
commit712e5df429b7a93ecee52d9f7e7d76594122a516 (patch)
treef87e798818997723dcde1aee8170ba478d01ff6a /makext.mk
parentd76533abb2a92a678cdf3236f1f8b94792e0b0c5 (diff)
downloadmakext-712e5df429b7a93ecee52d9f7e7d76594122a516.tar.gz
Added environmental variables from file loader extension
Diffstat (limited to 'makext.mk')
-rw-r--r--makext.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/makext.mk b/makext.mk
index 4c89377..1ade3fd 100644
--- a/makext.mk
+++ b/makext.mk
@@ -15,6 +15,13 @@ ifeq ($(OS),Windows_NT)
$(error makext does not support Windows operating system)
endif
+# Load environmental files from `MEX_ENVIRONMENT`. By default GNU make
+# loads what is already in `env`. This extends it to other files.
+ifdef MEX_ENVIRONMENT
+TEMP_ENV_FILES=$(shell echo $(MEX_ENVIRONMENT) | tr ',' ' ')
+$(foreach file,$(TEMP_ENV_FILES),$(eval include $(file)))
+endif
+
# Help extension that lists all the targets with descriptions
# and adds description and license information if data provided.
.PHONY: .help