From cc8982dd7e61b35fb92fca634085bb278ab54280 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Fri, 4 Nov 2011 16:51:11 +0200 Subject: [PATCH] tweaked variable logging Preferences might be somewhat interesting too: while the official ones shouldn't influence the build result at all, there's no whitelist so all kinds of weirdness can be stuffed into local config in principle. That should be diagnosable at least. --- Makefile | 3 +++ image.in/vars.mk | 14 +++++++++++--- lib/log.mk | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4b30ab82..db7a5355 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ IMAGE_NAME := $(basename $(IMAGE_FILE))# server-base IMAGE_TYPE := $(suffix $(IMAGE_FILE))# .iso (fix this too) IMAGE_TYPE := $(IMAGE_TYPE:.%=%)# iso +# preferences +-include $(HOME)/.mkimage/profiles.mk + # most of the actual work done elsewhere include lib/*.mk include conf.d/*.mk diff --git a/image.in/vars.mk b/image.in/vars.mk index bdf069d5..f46c63bb 100644 --- a/image.in/vars.mk +++ b/image.in/vars.mk @@ -1,14 +1,22 @@ # dump interesting variables' effective values; # based on http://stackoverflow.com/questions/7117978 -SPAM := $(.VARIABLES) DISTCFG_MK +# staged "uninteresting" lists +SPAM := SPAM INIT PREFS DISTCFG DISTCFG_MK +INIT := $(.VARIABLES) +-include $(HOME)/.mkimage/profiles.mk +PREFS := $(.VARIABLES) -include distcfg.mk -HAM := $(.VARIABLES) +DISTCFG := $(.VARIABLES) + +# a separator variable +-- := -- .PHONY: dump-vars dump-vars: $(foreach v, \ - $(filter-out $(SPAM) SPAM,$(sort $(HAM))), \ + $(filter-out $(SPAM) $(INIT),$(sort $(PREFS))) -- \ + $(filter-out $(SPAM) $(PREFS),$(sort $(DISTCFG))), \ $(info $(v) = $($(v)))) @: diff --git a/lib/log.mk b/lib/log.mk index a333d4e2..813ae240 100644 --- a/lib/log.mk +++ b/lib/log.mk @@ -26,4 +26,4 @@ endif DATE = $(shell date +%Y%m%d) TIME = `date +%H:%M:%S` -export BUILDLOG DATE DEBUG GLOBAL_DEBUG GLOBAL_VERBOSE LOG MAKE SHELL +export BUILDLOG DATE GLOBAL_DEBUG GLOBAL_VERBOSE LOG MAKE SHELL