aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/makefile_escaping/escaping_env_vars.mk
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-31 20:27:59 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-31 20:27:59 +0300
commit889987ba3f86f6989f32d121f8255d15d1e832fc (patch)
tree066724b0f28ac90fa7a42b91e1cf4aac8a58c25f /makefile_escaping/escaping_env_vars.mk
parentmakefile_escaping: a bit prettier YAML (diff)
downloadblog-889987ba3f86f6989f32d121f8255d15d1e832fc.tar.gz
blog-889987ba3f86f6989f32d121f8255d15d1e832fc.zip
makefile_escaping: Makefile best practices
Diffstat (limited to 'makefile_escaping/escaping_env_vars.mk')
-rw-r--r--makefile_escaping/escaping_env_vars.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/makefile_escaping/escaping_env_vars.mk b/makefile_escaping/escaping_env_vars.mk
index 5ec61ee..e1aeebf 100644
--- a/makefile_escaping/escaping_env_vars.mk
+++ b/makefile_escaping/escaping_env_vars.mk
@@ -1,4 +1,4 @@
-MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules --no-builtin-variables --warn-undefined-variables
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
@@ -7,7 +7,7 @@ SHELL := bash
escape = $(subst ','\'',$(1))
-define escape_arg
+define noexpand
ifeq ($$(origin $(1)),environment)
$(1) := $$(value $(1))
endif
@@ -22,7 +22,7 @@ endef
simple_var := Simple value
test_var ?= $(simple_var) in test_var
-$(eval $(call escape_arg,test_var))
+$(eval $(call noexpand,test_var))
simple_var := New simple value
composite_var := Composite value - $(simple_var) - $(test_var)