aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/makefile_escaping
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--makefile_escaping/escaping_env_vars.mk7
-rw-r--r--makefile_escaping/escaping_quotes.mk7
-rw-r--r--makefile_escaping/escaping_shell.mk7
-rw-r--r--makefile_escaping/prologue.mk6
-rw-r--r--makefile_escaping/quoting_args.mk7
5 files changed, 28 insertions, 6 deletions
diff --git a/makefile_escaping/escaping_env_vars.mk b/makefile_escaping/escaping_env_vars.mk
index 7fdc087..35ea35d 100644
--- a/makefile_escaping/escaping_env_vars.mk
+++ b/makefile_escaping/escaping_env_vars.mk
@@ -1,3 +1,10 @@
+MAKEFLAGS += --warn-undefined-variables
+.DEFAULT_GOAL := all
+.DELETE_ON_ERROR:
+.SUFFIXES:
+SHELL := bash
+.SHELLFLAGS := -e -o pipefail -c
+
escape = $(subst ','\'',$(1))
test_var ?= This is safe.
diff --git a/makefile_escaping/escaping_quotes.mk b/makefile_escaping/escaping_quotes.mk
index 2d953f8..2a43f69 100644
--- a/makefile_escaping/escaping_quotes.mk
+++ b/makefile_escaping/escaping_quotes.mk
@@ -1,3 +1,10 @@
+MAKEFLAGS += --warn-undefined-variables
+.DEFAULT_GOAL := all
+.DELETE_ON_ERROR:
+.SUFFIXES:
+SHELL := bash
+.SHELLFLAGS := -e -o pipefail -c
+
escape = $(subst ','\'',$(1))
test_var := Includes ' quote
diff --git a/makefile_escaping/escaping_shell.mk b/makefile_escaping/escaping_shell.mk
index 23f8f30..c81eb98 100644
--- a/makefile_escaping/escaping_shell.mk
+++ b/makefile_escaping/escaping_shell.mk
@@ -1,3 +1,10 @@
+MAKEFLAGS += --warn-undefined-variables
+.DEFAULT_GOAL := all
+.DELETE_ON_ERROR:
+.SUFFIXES:
+SHELL := bash
+.SHELLFLAGS := -e -o pipefail -c
+
escape = $(subst ','\'',$(1))
cwd := $(shell basename -- "$$( pwd )")
diff --git a/makefile_escaping/prologue.mk b/makefile_escaping/prologue.mk
deleted file mode 100644
index 1c12914..0000000
--- a/makefile_escaping/prologue.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-MAKEFLAGS += --warn-undefined-variables
-.DEFAULT_GOAL := all
-.DELETE_ON_ERROR:
-.SUFFIXES:
-SHELL := bash
-.SHELLFLAGS := -e -o pipefail -c
diff --git a/makefile_escaping/quoting_args.mk b/makefile_escaping/quoting_args.mk
index d27c81d..ff55f51 100644
--- a/makefile_escaping/quoting_args.mk
+++ b/makefile_escaping/quoting_args.mk
@@ -1,3 +1,10 @@
+MAKEFLAGS += --warn-undefined-variables
+.DEFAULT_GOAL := all
+.DELETE_ON_ERROR:
+.SUFFIXES:
+SHELL := bash
+.SHELLFLAGS := -e -o pipefail -c
+
test_var := Same line?
export test_var