Start to lift code to the makefile

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 67e50c2590
commit 06cfc43a72
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -48,13 +48,6 @@ _configure_arduino_cli_env() {
: "${ARDUINO_CLI:=${system_arduino_cli}}" : "${ARDUINO_CLI:=${system_arduino_cli}}"
fi fi
: "${ARDUINO_CONTENT:=${KALEIDOSCOPE_DIR}/.arduino}"
: "${ARDUINO_DIRECTORIES_DATA:=${ARDUINO_CONTENT}/data}"
: "${ARDUINO_DIRECTORIES_DOWNLOADS:=${ARDUINO_CONTENT}/downloads}"
: "${ARDUINO_DIRECTORIES_USER:=${ARDUINO_CONTENT}/user}"
: "${ARDUINO_CLI_CONFIG:=${ARDUINO_DIRECTORIES_DATA}/arduino-cli.yaml}"
: "${ARDUINO_BOARDS_MANAGER_KALEIDOSCOPE:=https://raw.githubusercontent.com/keyboardio/boardsmanager/master/package_keyboardio_index.json}"
} }
cmd_install_arduino_cli() { cmd_install_arduino_cli() {
@ -365,10 +358,6 @@ if [ $# -lt 1 ]; then
exit 1 exit 1
fi fi
: "${KALEIDOSCOPE_DIR:=$( cd "$(dirname "$0")"/.. ; pwd)}"
# shellcheck disable=SC2034
: "${KALEIDOSCOPE_BIN_DIR:=${KALEIDOSCOPE_DIR}/bin/}"
_identify_os _identify_os
_read_conf_files _read_conf_files
_configure_arduino_cli_env _configure_arduino_cli_env

@ -1,7 +1,18 @@
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path)) mkfile_dir := $(dir $(mkfile_path))
KALEIDOSCOPE_BUILDER_DIR ?= $(abspath $(mkfile_dir)/../bin)
export KALEIDOSCOPE_DIR ?= $(abspath $(mkfile_dir)/..)
export KALEIDOSCOPE_BIN_DIR ?= $(KALEIDOSCOPE_DIR)/bin
export ARDUINO_CONTENT ?= $(KALEIDOSCOPE_DIR)/.arduino
export ARDUINO_DIRECTORIES_DATA ?= $(ARDUINO_CONTENT)/data
export ARDUINO_DIRECTORIES_DOWNLOADS ?= $(ARDUINO_CONTENT)/downloads
export ARDUINO_DIRECTORIES_USER ?= $(ARDUINO_CONTENT)/user
export ARDUINO_CLI_CONFIG ?= $(ARDUINO_DIRECTORIES_DATA)/arduino-cli.yaml
export ARDUINO_BOARDS_MANAGER_KALEIDOSCOPE ?= https://raw.githubusercontent.com/keyboardio/boardsmanager/master/package_keyboardio_index.json
.DEFAULT_GOAL := compile .DEFAULT_GOAL := compile
@ -20,5 +31,5 @@ flash: compile
%: %:
ARDUINO_DIRECTORIES_USER=$(ARDUINO_DIRECTORIES_USER) $(KALEIDOSCOPE_BUILDER_DIR)/kaleidoscope-builder $@ ARDUINO_DIRECTORIES_USER=$(ARDUINO_DIRECTORIES_USER) $(KALEIDOSCOPE_BIN_DIR)/kaleidoscope-builder $@

Loading…
Cancel
Save