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
|
||||
with:
|
||||
path: tools
|
||||
key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('mk/tools.mk') }}
|
||||
|
||||
- name: Download and install toolchain
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
|
@ -56,7 +56,7 @@ jobs:
|
|||
id: cache-toolchain
|
||||
with:
|
||||
path: tools
|
||||
key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('mk/tools.mk') }}
|
||||
|
||||
- name: Hydrate configuration
|
||||
id: get-config
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -24,7 +24,7 @@ README.pdf
|
|||
/tools/
|
||||
/build/
|
||||
# local changes only
|
||||
make/local.mk
|
||||
mk/local.mk
|
||||
|
||||
# artefacts for VisualGDB (running in Visual Studio)
|
||||
mcu.mak
|
||||
|
|
29
Makefile
29
Makefile
|
@ -64,23 +64,24 @@ INCLUDE_DIRS := $(SRC_DIR) \
|
|||
$(ROOT)/src/main/target \
|
||||
$(ROOT)/src/main/startup
|
||||
LINKER_DIR := $(ROOT)/src/link
|
||||
MAKE_SCRIPT_DIR := $(ROOT)/mk
|
||||
|
||||
## V : Set verbosity level based on the V= parameter
|
||||
## V=0 Low
|
||||
## 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
|
||||
# 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
|
||||
ifneq ($(wildcard $(ROOT)/make/local.mk),)
|
||||
include $(ROOT)/make/local.mk
|
||||
ifneq ($(wildcard $(MAKE_SCRIPT_DIR)/local.mk),)
|
||||
include $(MAKE_SCRIPT_DIR)/local.mk
|
||||
endif
|
||||
|
||||
# pre-build sanity checks
|
||||
include $(ROOT)/make/checks.mk
|
||||
include $(MAKE_SCRIPT_DIR)/checks.mk
|
||||
|
||||
# basic target list
|
||||
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
|
||||
|
||||
# import macros that are OS specific
|
||||
include $(ROOT)/make/$(OSFAMILY).mk
|
||||
include $(MAKE_SCRIPT_DIR)/$(OSFAMILY).mk
|
||||
|
||||
# include the tools makefile
|
||||
include $(ROOT)/make/tools.mk
|
||||
include $(MAKE_SCRIPT_DIR)/tools.mk
|
||||
|
||||
# Search path for sources
|
||||
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)
|
||||
|
||||
# import config handling
|
||||
include $(ROOT)/make/config.mk
|
||||
include $(MAKE_SCRIPT_DIR)/config.mk
|
||||
|
||||
ifeq ($(CONFIG),)
|
||||
ifeq ($(TARGET),)
|
||||
|
@ -157,8 +158,8 @@ OPTIMISE_SIZE := -Os
|
|||
LTO_FLAGS := $(OPTIMISATION_BASE) $(OPTIMISE_SPEED)
|
||||
endif
|
||||
|
||||
VPATH := $(VPATH):$(ROOT)/make/mcu
|
||||
VPATH := $(VPATH):$(ROOT)/make
|
||||
VPATH := $(VPATH):$(MAKE_SCRIPT_DIR)/mcu
|
||||
VPATH := $(VPATH):$(MAKE_SCRIPT_DIR)
|
||||
|
||||
# start specific includes
|
||||
ifeq ($(TARGET_MCU),)
|
||||
|
@ -175,10 +176,10 @@ ifneq ($(CONFIG),)
|
|||
TARGET_FLAGS := $(TARGET_FLAGS) -DUSE_CONFIG
|
||||
endif
|
||||
|
||||
include $(ROOT)/make/mcu/$(TARGET_MCU_FAMILY).mk
|
||||
include $(MAKE_SCRIPT_DIR)/mcu/$(TARGET_MCU_FAMILY).mk
|
||||
|
||||
# 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.
|
||||
ifeq ($(TARGET_FLASH_SIZE),)
|
||||
|
@ -208,7 +209,7 @@ INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|||
|
||||
VPATH := $(VPATH):$(TARGET_DIR)
|
||||
|
||||
include $(ROOT)/make/source.mk
|
||||
include $(MAKE_SCRIPT_DIR)/source.mk
|
||||
|
||||
###############################################################################
|
||||
# Things that might need changing to use different tools
|
||||
|
@ -578,7 +579,7 @@ version:
|
|||
@echo $(FC_VER)
|
||||
|
||||
## help : print this help message and exit
|
||||
help: Makefile make/tools.mk
|
||||
help: Makefile mk/tools.mk
|
||||
@echo ""
|
||||
@echo "Makefile for the $(FORKNAME) firmware"
|
||||
@echo ""
|
||||
|
|
|
@ -265,7 +265,7 @@ else ifeq (,$(filter %_install test% clean% %-print checks help configs, $(MAKEC
|
|||
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)
|
||||
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
|
||||
|
||||
# ARM tookchain is in the path, and the version is what's required.
|
|
@ -14,10 +14,11 @@
|
|||
USER_DIR = ../main
|
||||
TEST_DIR = unit
|
||||
ROOT = ../..
|
||||
OBJECT_DIR = ../../obj/test
|
||||
OBJECT_DIR = $(ROOT)/obj/test
|
||||
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)
|
||||
|
||||
|
@ -592,7 +593,7 @@ GTEST_HEADERS = $(GTEST_DIR)/inc/gtest/*.h
|
|||
## V : Set verbosity level based on the V= parameter
|
||||
## V=0 Low
|
||||
## V=1 High
|
||||
include ../../make/build_verbosity.mk
|
||||
include $(MAKE_SCRIPT_DIR)/build_verbosity.mk
|
||||
|
||||
# House-keeping build targets.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue