From a9e6606e5351f69355edb72dc2b1ac84fd58e514 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 17:35:23 -0700 Subject: Make build-all non-interactive. 'make oldconfig' results in asking the user about options not explicitly set in the defconfig. Instead of copying, run 'conf --defconfig', as in the normal sample's build sequence. Also, invoke 'conf --oldconfig' directly, with a -s option, to avoid spamming with useless "configuration written to .config" messages. Signed-off-by: Alexey Neyman diff --git a/samples/samples.mk b/samples/samples.mk index e154e5c..35f3435 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -169,16 +169,17 @@ $(CT_SAMPLES): config_files # $2: prefix define build_sample @$(ECHO) ' CONF $(1)' - $(SILENT)cp $(call sample_dir,$(1))/crosstool.config .config + $(SILENT)$(CONF) -s --defconfig=$(call sample_dir,$(1))/crosstool.config $(KCONFIG_TOP) $(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(2)":;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config - $(SILENT)$(MAKE) -rf $(CT_NG) V=0 oldconfig + $(SILENT)$(CONF) -s --oldconfig $(KCONFIG_TOP) @$(ECHO) ' BUILD $(1)' $(SILENT)$(MAKE) -rf $(CT_NG) V=0 build + @printf '\r' endef # ---------------------------------------------------------- @@ -196,7 +197,7 @@ endif # MAKECMDGOALS contains a build sample rule endif # MAKECMDGOALS != "" # Build a single sample -$(patsubst %,build-%,$(CT_SAMPLES)): +$(patsubst %,build-%,$(CT_SAMPLES)): config_files $(call build_sample,$(patsubst build-%,%,$@),$(CT_PREFIX)/$(patsubst build-%,%,$@)) # Build al samples -- cgit v0.10.2-6-g49f6