blob: 47c1647789829b1b2c06e7cfe7475b6f13434a5d (
plain) (
tree)
|
|
escape = $(subst ','\'',$(1))
escape_var = $(call escape,$(value $(1)))
test_var ?= This is safe.
export test_var
echo_test_var := printf '%s\n' '$(call escape_var,test_var)'
bash_test_var := bash -c '$(call escape_var,echo_test_var)'
.PHONY: test
test:
@printf '%s\n' '$(call escape_var,test_var)'
@printf '%s\n' "$$test_var"
@bash -c '$(call escape_var,echo_test_var)'
@bash -c '$(call escape_var,bash_test_var)'
|