Skip to content

Commit

Permalink
build(core): introduce quiet mode
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
cepetr authored and matejcik committed Oct 3, 2024
1 parent 52a599f commit f765e11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down
3 changes: 3 additions & 0 deletions core/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit f765e11

Please sign in to comment.