mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
Add betaflight/config as submodule (#14158)
This commit is contained in:
parent
701ffb95d8
commit
892da2d46e
4 changed files with 13 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -57,5 +57,6 @@ ubuntu*.log
|
||||||
eeprom.bin
|
eeprom.bin
|
||||||
|
|
||||||
# config used for building targets
|
# config used for building targets
|
||||||
/src/config
|
# changed to submodule
|
||||||
|
#/src/config
|
||||||
|
|
||||||
|
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "config"]
|
||||||
|
path = src/config
|
||||||
|
url = https://github.com/betaflight/config.git
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
CONFIGS_REPO_URL ?= https://github.com/betaflight/config
|
CONFIGS_REPO_URL ?= https://github.com/betaflight/config
|
||||||
|
# handle only this directory as config submodule
|
||||||
|
CONFIGS_SUBMODULE_DIR = src/config
|
||||||
BASE_CONFIGS = $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(CONFIG_DIR)/configs/*/config.h)))))
|
BASE_CONFIGS = $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(CONFIG_DIR)/configs/*/config.h)))))
|
||||||
|
|
||||||
ifneq ($(filter-out %_install test% %_clean clean% %-print %.hex %.h hex checks help configs $(BASE_TARGETS) $(BASE_CONFIGS),$(MAKECMDGOALS)),)
|
ifneq ($(filter-out %_install test% %_clean clean% %-print %.hex %.h hex checks help configs $(BASE_TARGETS) $(BASE_CONFIGS),$(MAKECMDGOALS)),)
|
||||||
|
@ -50,12 +51,16 @@ endif #config
|
||||||
|
|
||||||
.PHONY: configs
|
.PHONY: configs
|
||||||
configs:
|
configs:
|
||||||
|
ifeq ($(shell realpath $(CONFIG_DIR)),$(shell realpath $(CONFIGS_SUBMODULE_DIR)))
|
||||||
|
git submodule update --init -- $(CONFIGS_SUBMODULE_DIR)
|
||||||
|
else
|
||||||
ifeq ($(wildcard $(CONFIG_DIR)),)
|
ifeq ($(wildcard $(CONFIG_DIR)),)
|
||||||
@echo "Hydrating clone for configs: $(CONFIG_DIR)"
|
@echo "Hydrating clone for configs: $(CONFIG_DIR)"
|
||||||
$(V0) git clone $(CONFIGS_REPO_URL) $(CONFIG_DIR)
|
$(V0) git clone $(CONFIGS_REPO_URL) $(CONFIG_DIR)
|
||||||
else
|
else
|
||||||
$(V0) git -C $(CONFIG_DIR) pull origin
|
$(V0) git -C $(CONFIG_DIR) pull origin
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
$(BASE_CONFIGS):
|
$(BASE_CONFIGS):
|
||||||
@echo "Building target config $@"
|
@echo "Building target config $@"
|
||||||
|
|
1
src/config
Submodule
1
src/config
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b0f3ab0cc91f80ab930d599da03446f8c54feb8c
|
Loading…
Add table
Add a link
Reference in a new issue