Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some build system cleanup #1458

Merged
merged 4 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions etc/makefiles/sketch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ endif

compile: kaleidoscope-hardware-configured check-rosetta
-$(QUIET) install -d "${OUTPUT_PATH}"
$(QUIET) $(ARDUINO_CLI) compile --fqbn "${FQBN}" ${ARDUINO_VERBOSE} ${ccache_wrapper_property} ${local_cflags_property} \
$(QUIET) \
ARDUINO_BUILD_CACHE_EXTRA_PATHS="${BUILD_PATH}" \
$(ARDUINO_CLI) compile --fqbn "${FQBN}" ${ARDUINO_VERBOSE} ${ccache_wrapper_property} ${local_cflags_property} \
${_arduino_local_libraries_prop} ${_ARDUINO_CLI_COMPILE_CUSTOM_FLAGS} ${kaleidoscope_board_config}\
--library "${KALEIDOSCOPE_DIR}" \
--libraries "${KALEIDOSCOPE_DIR}/plugins/" \
--build-path "${BUILD_PATH}" \
--output-dir "${OUTPUT_PATH}" \
--build-cache-path "${CORE_CACHE_PATH}" \
--output-dir "${OUTPUT_PATH}" -j 0 \
"${SKETCH_FILE_PATH}"
ifeq ($(LIBONLY),)
$(QUIET) cp "${BUILD_PATH}/${SKETCH_FILE_NAME}.hex" "${HEX_FILE_PATH}"
Expand All @@ -203,6 +204,9 @@ endif

flashing_instructions = $(call _arduino_prop,build.flashing_instructions)

# Filter out board options from FQBN because board list omits them
fqbn_no_opts := $(shell echo $(FQBN) | sed 's/:[a-z_][0-9a-z_.]*=.*$$//')

flash: ${HEX_FILE_PATH}
ifneq ($(flashing_instructions),)
$(info $(shell printf $(flashing_instructions)))
Expand All @@ -214,6 +218,6 @@ endif
$(info )
@$(shell read _)
$(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \
$(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) | awk '{ print "--port", $$1; exit }' ) \
$(shell $(ARDUINO_CLI) board list --format=text | grep $(fqbn_no_opts) | awk '{ print "--port", $$1; exit }' ) \
--input-dir "${OUTPUT_PATH}" \
$(ARDUINO_VERBOSE)
2 changes: 1 addition & 1 deletion testing/makefiles/testcase.mk
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ${BIN_DIR}/${BIN_FILE}: compile-sketch
.PHONY: compile-sketch
compile-sketch: ${libcommon_a} ${TEST_OBJS}
-@install -d "${BIN_DIR}" "${LIB_DIR}"
$(QUIET) env LIBONLY=yes VERBOSE=${VERBOSE} \
$(QUIET) env LIBONLY=yes VERBOSE=${VERBOSE} QUIET=$(QUIET) \
OUTPUT_PATH="${LIB_DIR}" \
_ARDUINO_CLI_COMPILE_CUSTOM_FLAGS='--build-property upload.maximum_size=""' \
$(MAKE) -f ${top_dir}/etc/makefiles/sketch.mk compile
Expand Down
Loading