aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/makefile_escaping/escaping_env_vars.mk
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-05-30 22:29:37 +0000
committerEgor Tensin <Egor.Tensin@gmail.com>2020-05-30 22:39:58 +0000
commit57f3fc6408539a2fa53199e78195c6f1494873fe (patch)
tree0b7b69f59de92b9d9bf51dfe9c013c29928e6ac4 /makefile_escaping/escaping_env_vars.mk
parentmakefile_escaping: more concise test cases (diff)
downloadblog-57f3fc6408539a2fa53199e78195c6f1494873fe.tar.gz
blog-57f3fc6408539a2fa53199e78195c6f1494873fe.zip
makefile_escaping: formatting
Diffstat (limited to 'makefile_escaping/escaping_env_vars.mk')
-rw-r--r--makefile_escaping/escaping_env_vars.mk12
1 files changed, 6 insertions, 6 deletions
diff --git a/makefile_escaping/escaping_env_vars.mk b/makefile_escaping/escaping_env_vars.mk
index f2e7a2d..5ec61ee 100644
--- a/makefile_escaping/escaping_env_vars.mk
+++ b/makefile_escaping/escaping_env_vars.mk
@@ -7,22 +7,22 @@ SHELL := bash
escape = $(subst ','\'',$(1))
-define escape_env
+define escape_arg
ifeq ($$(origin $(1)),environment)
-$(1) := $$(value $(1))
+ $(1) := $$(value $(1))
endif
ifeq ($$(origin $(1)),environment override)
-$(1) := $$(value $(1))
+ $(1) := $$(value $(1))
endif
ifeq ($$(origin $(1)),command line)
-override $(1) := $$(value $(1))
+ override $(1) := $$(value $(1))
endif
endef
simple_var := Simple value
-test_var ?= $(simple_var) (in test_var)
-$(eval $(call escape_env,test_var))
+test_var ?= $(simple_var) in test_var
+$(eval $(call escape_arg,test_var))
simple_var := New simple value
composite_var := Composite value - $(simple_var) - $(test_var)