Skip to content

Commit b59a3e5

Browse files
committed
support user-configuration files
1 parent 52ad29d commit b59a3e5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ __pycache__/
5555
######################
5656
GNUmakefile
5757
user.props
58+
mpconfiguser1.mk
59+
mpconfiguser2.mk
60+
user_defns.mk
5861

5962
# Sphinx output
6063
###############

py/circuitpy_mkenv.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ ifneq ($(VALID_BOARD),)
4343
include boards/$(BOARD)/mpconfigboard.mk
4444
endif
4545

46+
# user-specific settings that mpconfigport does not override
47+
# (i.e. mpconfigport.mk uses "foo ?= bar")
48+
-include mpconfiguser1.mk
49+
4650
# Port-specific
4751
include mpconfigport.mk
4852

@@ -52,6 +56,10 @@ ifneq ($(VALID_BOARD),)
5256
include $(TOP)/py/circuitpy_mpconfig.mk
5357
endif
5458

59+
# user-specific overrides of hard-coded settings
60+
# (i.e. xxx.mk uses "foo = bar")
61+
-include mpconfiguser2.mk
62+
5563
# qstr definitions (must come before including py.mk)
5664
QSTR_DEFS = qstrdefsport.h
5765

@@ -62,3 +70,6 @@ include $(TOP)/supervisor/supervisor.mk
6270

6371
# Include make rules and variables common across CircuitPython builds.
6472
include $(TOP)/py/circuitpy_defns.mk
73+
74+
# user specific
75+
-include user_defns.mk

0 commit comments

Comments
 (0)