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
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -43,7 +43,7 @@ stm32.mak
|
|||
# artefacts for VS Code
|
||||
/.vscode/
|
||||
|
||||
# artefacts for Visual Studio
|
||||
# artefacts for Visual Studio
|
||||
/.vs
|
||||
|
||||
# artefacts for CLion
|
||||
|
@ -57,5 +57,6 @@ ubuntu*.log
|
|||
eeprom.bin
|
||||
|
||||
# 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
|
||||
|
||||
# handle only this directory as config submodule
|
||||
CONFIGS_SUBMODULE_DIR = src/config
|
||||
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)),)
|
||||
|
@ -50,12 +51,16 @@ endif #config
|
|||
|
||||
.PHONY: configs
|
||||
configs:
|
||||
ifeq ($(shell realpath $(CONFIG_DIR)),$(shell realpath $(CONFIGS_SUBMODULE_DIR)))
|
||||
git submodule update --init -- $(CONFIGS_SUBMODULE_DIR)
|
||||
else
|
||||
ifeq ($(wildcard $(CONFIG_DIR)),)
|
||||
@echo "Hydrating clone for configs: $(CONFIG_DIR)"
|
||||
$(V0) git clone $(CONFIGS_REPO_URL) $(CONFIG_DIR)
|
||||
else
|
||||
$(V0) git -C $(CONFIG_DIR) pull origin
|
||||
endif
|
||||
endif
|
||||
|
||||
$(BASE_CONFIGS):
|
||||
@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