From ddeadb135e846cd3fb1f374160b944fd28ce729e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 29 May 2020 23:02:49 +0000 Subject: makefile_escaping: add prologue to all *.mk files --- makefile_escaping/escaping_env_vars.mk | 7 +++++++ makefile_escaping/escaping_quotes.mk | 7 +++++++ makefile_escaping/escaping_shell.mk | 7 +++++++ makefile_escaping/prologue.mk | 6 ------ makefile_escaping/quoting_args.mk | 7 +++++++ 5 files changed, 28 insertions(+), 6 deletions(-) delete mode 100644 makefile_escaping/prologue.mk (limited to 'makefile_escaping') 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 -- cgit v1.2.3