From d330445fb7f84748e70e67ca5bc44ce0a1a258f7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 9 Jun 2016 15:55:33 -0400 Subject: Work with the new version of autothing. --- build-aux/no-builtin-variables.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 build-aux/no-builtin-variables.mk (limited to 'build-aux/no-builtin-variables.mk') diff --git a/build-aux/no-builtin-variables.mk b/build-aux/no-builtin-variables.mk new file mode 100644 index 0000000..c236c73 --- /dev/null +++ b/build-aux/no-builtin-variables.mk @@ -0,0 +1,11 @@ +MAKEFLAGS += --no-builtin-variables + +# This version is more correct, but is slower: +# $(foreach v,$(shell bash -c 'comm -23 <(env -i $(MAKE) -f - <<<"\$$(info \$$(.VARIABLES))all:"|sed "s/ /\n/g"|sort) <(env -i $(MAKE) -R -f - <<<"\$$(info \$$(.VARIABLES))all:"|sed "s/ /\n/g"|sort)'), +# $(if $(filter default,$(origin $v)),$(eval undefine $v))) + +_default_variables = $(foreach v,$(.VARIABLES),$(if $(filter default,$(origin $v)),$v)) +$(foreach v,$(filter-out .% MAKE% SUFFIXES,$(_default_variables))\ + $(filter .LIBPATTERNS MAKEINFO,$(_default_variables)),\ + $(eval undefine $v)) +undefine _default_variables -- cgit v1.2.3-54-g00ecf