path: root/samples
diff options
authorAlexey Neyman <>2015-10-29 00:35:23 (GMT)
committerAlexey Neyman <>2015-10-30 23:24:52 (GMT)
commita9e6606e5351f69355edb72dc2b1ac84fd58e514 (patch)
treebd6c7c443012fffd7dbdd81efb3f6217adea25d2 /samples
parente71f0db6e340192b149a74a4a99058091e8455fa (diff)
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 <>
Diffstat (limited to 'samples')
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/ b/samples/
index e154e5c..35f3435 100644
--- a/samples/
+++ b/samples/
@@ -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'
# ----------------------------------------------------------
@@ -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