aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/workflows/makefile-escaping.yml4
-rw-r--r--makefile_escaping/escaping_env_vars.mk12
2 files changed, 8 insertions, 8 deletions
diff --git a/.github/workflows/makefile-escaping.yml b/.github/workflows/makefile-escaping.yml
index e2dbf6c..9c8df3b 100644
--- a/.github/workflows/makefile-escaping.yml
+++ b/.github/workflows/makefile-escaping.yml
@@ -87,8 +87,8 @@ jobs:
diff <( echo "$expected_overridden" ) <( make -f escaping_env_vars.mk test test_var="Quote ' "'and variable ${reference}' )
env:
expected_default: |-
- New simple value (in test_var)
- Composite value - New simple value - New simple value (in test_var)
+ New simple value in test_var
+ Composite value - New simple value - New simple value in test_var
expected_tricky: |-
Quote ' and variable ${reference}
Composite value - New simple value - Quote ' and variable ${reference}
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)