mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
Rename make folder to get rid of build error. (#12880)
When trying to build firmware with current directory in PATH environment it scans for make command and generates "Permission denied" error in case if current directory in PATH precedes /usr/bin/ directory.In my case it was caused by incorrect pyenv init script. Rename make folder to avoid errors like this.
This commit is contained in:
parent
eb4d95e039
commit
7b39d3d296
20 changed files with 23 additions and 21 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
id: cache-toolchain
|
id: cache-toolchain
|
||||||
with:
|
with:
|
||||||
path: tools
|
path: tools
|
||||||
key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}
|
key: ${{ runner.os }}-${{ hashFiles('mk/tools.mk') }}
|
||||||
|
|
||||||
- name: Download and install toolchain
|
- name: Download and install toolchain
|
||||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||||
|
@ -56,7 +56,7 @@ jobs:
|
||||||
id: cache-toolchain
|
id: cache-toolchain
|
||||||
with:
|
with:
|
||||||
path: tools
|
path: tools
|
||||||
key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}
|
key: ${{ runner.os }}-${{ hashFiles('mk/tools.mk') }}
|
||||||
|
|
||||||
- name: Hydrate configuration
|
- name: Hydrate configuration
|
||||||
id: get-config
|
id: get-config
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -24,7 +24,7 @@ README.pdf
|
||||||
/tools/
|
/tools/
|
||||||
/build/
|
/build/
|
||||||
# local changes only
|
# local changes only
|
||||||
make/local.mk
|
mk/local.mk
|
||||||
|
|
||||||
# artefacts for VisualGDB (running in Visual Studio)
|
# artefacts for VisualGDB (running in Visual Studio)
|
||||||
mcu.mak
|
mcu.mak
|
||||||
|
|
29
Makefile
29
Makefile
|
@ -64,23 +64,24 @@ INCLUDE_DIRS := $(SRC_DIR) \
|
||||||
$(ROOT)/src/main/target \
|
$(ROOT)/src/main/target \
|
||||||
$(ROOT)/src/main/startup
|
$(ROOT)/src/main/startup
|
||||||
LINKER_DIR := $(ROOT)/src/link
|
LINKER_DIR := $(ROOT)/src/link
|
||||||
|
MAKE_SCRIPT_DIR := $(ROOT)/mk
|
||||||
|
|
||||||
## V : Set verbosity level based on the V= parameter
|
## V : Set verbosity level based on the V= parameter
|
||||||
## V=0 Low
|
## V=0 Low
|
||||||
## V=1 High
|
## V=1 High
|
||||||
include $(ROOT)/make/build_verbosity.mk
|
include $(MAKE_SCRIPT_DIR)/build_verbosity.mk
|
||||||
|
|
||||||
# Build tools, so we all share the same versions
|
# Build tools, so we all share the same versions
|
||||||
# import macros common to all supported build systems
|
# import macros common to all supported build systems
|
||||||
include $(ROOT)/make/system-id.mk
|
include $(MAKE_SCRIPT_DIR)/system-id.mk
|
||||||
|
|
||||||
# developer preferences, edit these at will, they'll be gitignored
|
# developer preferences, edit these at will, they'll be gitignored
|
||||||
ifneq ($(wildcard $(ROOT)/make/local.mk),)
|
ifneq ($(wildcard $(MAKE_SCRIPT_DIR)/local.mk),)
|
||||||
include $(ROOT)/make/local.mk
|
include $(MAKE_SCRIPT_DIR)/local.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# pre-build sanity checks
|
# pre-build sanity checks
|
||||||
include $(ROOT)/make/checks.mk
|
include $(MAKE_SCRIPT_DIR)/checks.mk
|
||||||
|
|
||||||
# basic target list
|
# basic target list
|
||||||
BASE_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(ROOT)/src/main/target/*/target.mk)))))
|
BASE_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(ROOT)/src/main/target/*/target.mk)))))
|
||||||
|
@ -97,10 +98,10 @@ DIRECTORIES := $(DL_DIR) $(TOOLS_DIR)
|
||||||
export RM := rm
|
export RM := rm
|
||||||
|
|
||||||
# import macros that are OS specific
|
# import macros that are OS specific
|
||||||
include $(ROOT)/make/$(OSFAMILY).mk
|
include $(MAKE_SCRIPT_DIR)/$(OSFAMILY).mk
|
||||||
|
|
||||||
# include the tools makefile
|
# include the tools makefile
|
||||||
include $(ROOT)/make/tools.mk
|
include $(MAKE_SCRIPT_DIR)/tools.mk
|
||||||
|
|
||||||
# Search path for sources
|
# Search path for sources
|
||||||
VPATH := $(SRC_DIR):$(SRC_DIR)/startup
|
VPATH := $(SRC_DIR):$(SRC_DIR)/startup
|
||||||
|
@ -115,7 +116,7 @@ FC_VER_PATCH := $(shell grep " FC_VERSION_PATCH" src/main/build/version.h | awk
|
||||||
FC_VER := $(FC_VER_MAJOR).$(FC_VER_MINOR).$(FC_VER_PATCH)
|
FC_VER := $(FC_VER_MAJOR).$(FC_VER_MINOR).$(FC_VER_PATCH)
|
||||||
|
|
||||||
# import config handling
|
# import config handling
|
||||||
include $(ROOT)/make/config.mk
|
include $(MAKE_SCRIPT_DIR)/config.mk
|
||||||
|
|
||||||
ifeq ($(CONFIG),)
|
ifeq ($(CONFIG),)
|
||||||
ifeq ($(TARGET),)
|
ifeq ($(TARGET),)
|
||||||
|
@ -157,8 +158,8 @@ OPTIMISE_SIZE := -Os
|
||||||
LTO_FLAGS := $(OPTIMISATION_BASE) $(OPTIMISE_SPEED)
|
LTO_FLAGS := $(OPTIMISATION_BASE) $(OPTIMISE_SPEED)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VPATH := $(VPATH):$(ROOT)/make/mcu
|
VPATH := $(VPATH):$(MAKE_SCRIPT_DIR)/mcu
|
||||||
VPATH := $(VPATH):$(ROOT)/make
|
VPATH := $(VPATH):$(MAKE_SCRIPT_DIR)
|
||||||
|
|
||||||
# start specific includes
|
# start specific includes
|
||||||
ifeq ($(TARGET_MCU),)
|
ifeq ($(TARGET_MCU),)
|
||||||
|
@ -175,10 +176,10 @@ ifneq ($(CONFIG),)
|
||||||
TARGET_FLAGS := $(TARGET_FLAGS) -DUSE_CONFIG
|
TARGET_FLAGS := $(TARGET_FLAGS) -DUSE_CONFIG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(ROOT)/make/mcu/$(TARGET_MCU_FAMILY).mk
|
include $(MAKE_SCRIPT_DIR)/mcu/$(TARGET_MCU_FAMILY).mk
|
||||||
|
|
||||||
# openocd specific includes
|
# openocd specific includes
|
||||||
include $(ROOT)/make/openocd.mk
|
include $(MAKE_SCRIPT_DIR)/openocd.mk
|
||||||
|
|
||||||
# Configure default flash sizes for the targets (largest size specified gets hit first) if flash not specified already.
|
# Configure default flash sizes for the targets (largest size specified gets hit first) if flash not specified already.
|
||||||
ifeq ($(TARGET_FLASH_SIZE),)
|
ifeq ($(TARGET_FLASH_SIZE),)
|
||||||
|
@ -208,7 +209,7 @@ INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
||||||
|
|
||||||
VPATH := $(VPATH):$(TARGET_DIR)
|
VPATH := $(VPATH):$(TARGET_DIR)
|
||||||
|
|
||||||
include $(ROOT)/make/source.mk
|
include $(MAKE_SCRIPT_DIR)/source.mk
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Things that might need changing to use different tools
|
# Things that might need changing to use different tools
|
||||||
|
@ -578,7 +579,7 @@ version:
|
||||||
@echo $(FC_VER)
|
@echo $(FC_VER)
|
||||||
|
|
||||||
## help : print this help message and exit
|
## help : print this help message and exit
|
||||||
help: Makefile make/tools.mk
|
help: Makefile mk/tools.mk
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Makefile for the $(FORKNAME) firmware"
|
@echo "Makefile for the $(FORKNAME) firmware"
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
|
@ -265,7 +265,7 @@ else ifeq (,$(filter %_install test% clean% %-print checks help configs, $(MAKEC
|
||||||
ifeq ($(GCC_VERSION),)
|
ifeq ($(GCC_VERSION),)
|
||||||
$(error **ERROR** arm-none-eabi-gcc not in the PATH. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo)
|
$(error **ERROR** arm-none-eabi-gcc not in the PATH. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo)
|
||||||
else ifneq ($(GCC_VERSION), $(GCC_REQUIRED_VERSION))
|
else ifneq ($(GCC_VERSION), $(GCC_REQUIRED_VERSION))
|
||||||
$(error **ERROR** your arm-none-eabi-gcc is '$(GCC_VERSION)', but '$(GCC_REQUIRED_VERSION)' is expected. Override with 'GCC_REQUIRED_VERSION' in make/local.mk or run 'make arm_sdk_install' to install the right version automatically in the tools folder of this repo)
|
$(error **ERROR** your arm-none-eabi-gcc is '$(GCC_VERSION)', but '$(GCC_REQUIRED_VERSION)' is expected. Override with 'GCC_REQUIRED_VERSION' in mk/local.mk or run 'make arm_sdk_install' to install the right version automatically in the tools folder of this repo)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ARM tookchain is in the path, and the version is what's required.
|
# ARM tookchain is in the path, and the version is what's required.
|
|
@ -14,10 +14,11 @@
|
||||||
USER_DIR = ../main
|
USER_DIR = ../main
|
||||||
TEST_DIR = unit
|
TEST_DIR = unit
|
||||||
ROOT = ../..
|
ROOT = ../..
|
||||||
OBJECT_DIR = ../../obj/test
|
OBJECT_DIR = $(ROOT)/obj/test
|
||||||
TARGET_DIR = $(USER_DIR)/target
|
TARGET_DIR = $(USER_DIR)/target
|
||||||
|
MAKE_SCRIPT_DIR := $(ROOT)/mk
|
||||||
|
|
||||||
include $(ROOT)/make/system-id.mk
|
include $(MAKE_SCRIPT_DIR)/system-id.mk
|
||||||
|
|
||||||
VPATH := $(VPATH):$(USER_DIR):$(TEST_DIR)
|
VPATH := $(VPATH):$(USER_DIR):$(TEST_DIR)
|
||||||
|
|
||||||
|
@ -592,7 +593,7 @@ GTEST_HEADERS = $(GTEST_DIR)/inc/gtest/*.h
|
||||||
## V : Set verbosity level based on the V= parameter
|
## V : Set verbosity level based on the V= parameter
|
||||||
## V=0 Low
|
## V=0 Low
|
||||||
## V=1 High
|
## V=1 High
|
||||||
include ../../make/build_verbosity.mk
|
include $(MAKE_SCRIPT_DIR)/build_verbosity.mk
|
||||||
|
|
||||||
# House-keeping build targets.
|
# House-keeping build targets.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue