From f765e11eaed869eb68546963e1e99fea085771f9 Mon Sep 17 00:00:00 2001 From: cepetr Date: Wed, 2 Oct 2024 09:38:49 +0200 Subject: [PATCH] build(core): introduce quiet mode [no changelog] --- core/Makefile | 11 +++++++++-- core/SConstruct | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index 7d9e30d1e79..6340cc5c77e 100644 --- a/core/Makefile +++ b/core/Makefile @@ -40,6 +40,7 @@ TEST_LANG ?= "en" NEW_RENDERING ?= 1 THP ?= 0 TREZOR_EMULATOR_DEBUGGABLE ?= 0 +QUIET_MODE ?= 0 # OpenOCD interface default. Alternative: ftdi/olimex-arm-usb-tiny-h OPENOCD_INTERFACE ?= stlink @@ -138,9 +139,15 @@ SCONS_VARS = \ TREZOR_EMULATOR_ASAN="$(ADDRESS_SANITIZER)" \ TREZOR_EMULATOR_DEBUGGABLE=$(TREZOR_EMULATOR_DEBUGGABLE) \ TREZOR_MEMPERF="$(TREZOR_MEMPERF)" \ - TREZOR_MODEL="$(TREZOR_MODEL)" + TREZOR_MODEL="$(TREZOR_MODEL)" \ + QUIET_MODE="$(QUIET_MODE)" -SCONS = scons -Q -j $(JOBS) $(SCONS_VARS) +SCONS_OPTS = -Q -j $(JOBS) +ifeq ($(QUIET_MODE),1) +SCONS_OPTS += --quiet +endif + +SCONS = scons $(SCONS_OPTS) $(SCONS_VARS) ## help commands: diff --git a/core/SConstruct b/core/SConstruct index 6446691cf3e..0ea3bdfb7f7 100644 --- a/core/SConstruct +++ b/core/SConstruct @@ -12,3 +12,6 @@ SConscript('SConscript.firmware', variant_dir='build/firmware', duplicate=False) SConscript('SConscript.prodtest', variant_dir='build/prodtest', duplicate=False) SConscript('SConscript.reflash', variant_dir='build/reflash', duplicate=False) SConscript('SConscript.unix', variant_dir='build/unix', duplicate=False) + +if ARGUMENTS.get('QUIET_MODE', '1'): + Progress('$TARGET\r', overwrite=True) \ No newline at end of file