From 06b5c19d63ac6d26543301ed70d6dfb637363016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 26 Nov 2018 17:18:44 +0100 Subject: Rename render_template to core_render and move into core Also remove the last instance of an "eval export" that pollutes the environment and use the new core_render for it instead. core_render does not include $(verbose) as this needs to be different depending on who calls it. It's now set explicitly everywhere required. --- core/core.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/core.mk') diff --git a/core/core.mk b/core/core.mk index 0d0fd90..bc4d306 100644 --- a/core/core.mk +++ b/core/core.mk @@ -182,6 +182,10 @@ core_ls = $(filter-out $(1),$(shell echo $(1))) # @todo Use a solution that does not require using perl. core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2) +define core_render + printf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $(1))))))\n' > $(2) +endef + # Automated update. ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mk -- cgit v1.2.3