From b6a8bb6dbd04de968ba1ce69f88e5bb8dc64cc6e Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Tue, 5 Apr 2022 23:28:48 -0500 Subject: [PATCH] Re-order some makefile targets for clarity Signed-off-by: Michael Richters --- Makefile | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index fd69be88..3647af3b 100644 --- a/Makefile +++ b/Makefile @@ -39,20 +39,13 @@ endif .DEFAULT_GOAL := smoke-sketches .PHONY: setup -setup: $(ARDUINO_CLI_PATH) $(ARDUINO_DIRECTORIES_DATA)/arduino-cli.yaml install-arduino-core-avr install-arduino-core-kaleidoscope $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/boards.txt $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/virtual/boards.txt +setup: $(ARDUINO_CLI_PATH) $(ARDUINO_DIRECTORIES_DATA)/arduino-cli.yaml install-arduino-core-avr install-arduino-core-kaleidoscope checkout-platform prepare-virtual @: .PHONY: checkout-platform checkout-platform: $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/boards.txt @: -.PHONY: prepare-virtual -prepare-virtual: $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/virtual/boards.txt - @: - -$(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/virtual/boards.txt: - $(MAKE) -C $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio prepare-virtual - $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/boards.txt: git clone -c core.symlinks=true \ --recurse-submodules \ @@ -67,6 +60,13 @@ $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/boards.txt: --recurse-submodules=':(exclude)libraries/Kaleidoscope' \ https://github.com/keyboardio/ArduinoCore-GD32-Keyboardio $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/gd32 +.PHONY: prepare-virtual +prepare-virtual: $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/virtual/boards.txt + @: + +$(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/virtual/boards.txt: + $(MAKE) -C $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio prepare-virtual + .PHONY: update update: cd $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio; git pull; \ @@ -93,11 +93,6 @@ docker-clean: docker-bash: _NO_SYNC_KALEIDOSCOPE=1 DOCKER_LIVE_KALEIDOSCOPE_DIR=1 ARDUINO_DIRECTORIES_USER="$(ARDUINO_DIRECTORIES_USER)" ./bin/run-docker "bash" -.PHONY: run-tests -run-tests: $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/virtual/boards.txt build-gtest-gmock - $(MAKE) -c tests - @: # blah - build-gtest-gmock: (cd testing/googletest && cmake -H. -Bbuild -DCMAKE_C_COMPILER=$(call _arduino_prop,compiler.path)$(call _arduino_prop,compiler.c.cmd) -DCMAKE_CXX_COMPILER=$(call _arduino_prop,compiler.path)$(call _arduino_prop,compiler.cpp.cmd) .) $(MAKE) -C testing/googletest @@ -140,16 +135,16 @@ SMOKE_SKETCHES := $(sort $(shell if [ -d ./examples ]; then find ./examples -typ smoke-sketches: $(SMOKE_SKETCHES) @echo "Smoke-tested all the sketches" +.PHONY: force +$(SMOKE_SKETCHES): force + $(MAKE) -C $@ -f $(KALEIDOSCOPE_ETC_DIR)/makefiles/sketch.mk compile + .PHONY: clean clean: $(MAKE) -C tests clean rm -rf -- "testing/googletest/build/*" rm -rf -- "_build/*" -.PHONY: force -$(SMOKE_SKETCHES): force - $(MAKE) -C $@ -f $(KALEIDOSCOPE_ETC_DIR)/makefiles/sketch.mk compile - build-arduino-nightly-package: perl bin/build-arduino-package \ --kaleidoscope-tag=master \