aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/makefile_escaping
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-05-29 23:02:49 +0000
committerEgor Tensin <Egor.Tensin@gmail.com>2020-05-29 23:02:49 +0000
commitddeadb135e846cd3fb1f374160b944fd28ce729e (patch)
treebabd42aee3090c5382a5ff2db526ba17af33d6d7 /makefile_escaping
parentmakefile_escaping: rename *.mk files (diff)
downloadblog-ddeadb135e846cd3fb1f374160b944fd28ce729e.tar.gz
blog-ddeadb135e846cd3fb1f374160b944fd28ce729e.zip
makefile_escaping: add prologue to all *.mk files
Diffstat (limited to 'makefile_escaping')
-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