Skip to content

Commit b77d1d3

Browse files
ppannutoalistair23
authored andcommitted
sensor-lorawan: only override config if missing
1 parent 664f146 commit b77d1d3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

examples/build_all.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
NUM_JOBS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || 4)
44

5+
export TOCK_BUILDALL=1
6+
57
set -e
68
set -u
79
set -o pipefail

examples/lora/sensor-lorawan/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ CXX_SRCS := $(wildcard *.cc)
1010

1111
override CPPFLAGS += -DRADIOLIB_CLOCK_DRIFT_MS=9
1212

13-
ifneq ($(CI),)
13+
# If we are building for a testing configuration (e.g. CI) then it's okay to
14+
# use the example config header. However, if someone is doing local testing,
15+
# especially of a different thing, we don't want to accidentally overwrite
16+
# the build obeject here with the example config when a real one exists.
17+
ifneq ($(TOCK_BUILDALL),)
18+
ifeq ($(wildcard radioConfig.h),)
1419
override CPPFLAGS += "-DRADIO_CONFIG_CI=radioConfig_example.h"
1520
endif
21+
endif
1622

1723
# Use the libtock-c Make system
1824
EXTERN_LIBS += $(TOCK_USERLAND_BASE_DIR)/RadioLib

0 commit comments

Comments
 (0)