Skip to content

Commit 160a481

Browse files
projectgusdpgeorge
authored andcommitted
esp32: Pass V=1 or BUILD_VERBOSE through to idf.py when building.
Allows verbose build to work the same on esp32 port as other ports. To minimise copy/paste, split the BUILD_VERBOSE section of mkenv.mk out to its own verbose.mk and include this in the port Makefile. Signed-off-by: Angus Gratton <[email protected]>
1 parent 5fb846d commit 160a481

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

ports/esp32/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# This is a simple, convenience wrapper around idf.py (which uses cmake).
44

5+
include ../../py/verbose.mk
6+
57
# Select the board to build for:
68
ifdef BOARD_DIR
79
# Custom board path - remove trailing slash and get the final component of
@@ -61,6 +63,10 @@ ifdef MICROPY_PREVIEW_VERSION_2
6163
IDFPY_FLAGS += -D MICROPY_PREVIEW_VERSION_2=1
6264
endif
6365

66+
ifeq ($(BUILD_VERBOSE),1)
67+
IDFPY_FLAGS += --verbose
68+
endif
69+
6470
HELP_BUILD_ERROR ?= "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m"
6571

6672
define RUN_IDF_PY

py/mkenv.mk

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,7 @@ endif
1212
THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
1313
TOP := $(patsubst %/py/mkenv.mk,%,$(THIS_MAKEFILE))
1414

15-
# Turn on increased build verbosity by defining BUILD_VERBOSE in your main
16-
# Makefile or in your environment. You can also use V=1 on the make command
17-
# line.
18-
19-
ifeq ("$(origin V)", "command line")
20-
BUILD_VERBOSE=$(V)
21-
endif
22-
ifndef BUILD_VERBOSE
23-
$(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.)
24-
BUILD_VERBOSE = 0
25-
endif
26-
ifeq ($(BUILD_VERBOSE),0)
27-
Q = @
28-
else
29-
Q =
30-
endif
15+
include $(TOP)/py/verbose.mk
3116

3217
# default settings; can be overridden in main Makefile
3318

py/verbose.mk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Turn on increased build verbosity by defining BUILD_VERBOSE in your main
2+
# Makefile or in your environment. You can also use V=1 on the make command
3+
# line.
4+
5+
ifeq ("$(origin V)", "command line")
6+
BUILD_VERBOSE=$(V)
7+
endif
8+
ifndef BUILD_VERBOSE
9+
$(info Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.)
10+
BUILD_VERBOSE = 0
11+
endif
12+
ifeq ($(BUILD_VERBOSE),0)
13+
Q = @
14+
else
15+
Q =
16+
endif

0 commit comments

Comments
 (0)