Skip to content

Commit

Permalink
Revert "Rename make folder to get rid of build error. (#12880)"
Browse files Browse the repository at this point in the history
This reverts commit 7b39d3d.
  • Loading branch information
haslinghuis committed Jul 12, 2023
1 parent 949181e commit 691a6aa
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: cache-toolchain
with:
path: tools
key: ${{ runner.os }}-${{ hashFiles('mk/tools.mk') }}
key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}

- name: Download and install toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
id: cache-toolchain
with:
path: tools
key: ${{ runner.os }}-${{ hashFiles('mk/tools.mk') }}
key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }}

- name: Hydrate configuration
id: get-config
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ README.pdf
/tools/
/build/
# local changes only
mk/local.mk
make/local.mk

# artefacts for VisualGDB (running in Visual Studio)
mcu.mak
Expand Down
29 changes: 14 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,23 @@ 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 $(MAKE_SCRIPT_DIR)/build_verbosity.mk
include $(ROOT)/make/build_verbosity.mk

# Build tools, so we all share the same versions
# import macros common to all supported build systems
include $(MAKE_SCRIPT_DIR)/system-id.mk
include $(ROOT)/make/system-id.mk

# developer preferences, edit these at will, they'll be gitignored
ifneq ($(wildcard $(MAKE_SCRIPT_DIR)/local.mk),)
include $(MAKE_SCRIPT_DIR)/local.mk
ifneq ($(wildcard $(ROOT)/make/local.mk),)
include $(ROOT)/make/local.mk
endif

# pre-build sanity checks
include $(MAKE_SCRIPT_DIR)/checks.mk
include $(ROOT)/make/checks.mk

# basic target list
BASE_TARGETS := $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(ROOT)/src/main/target/*/target.mk)))))
Expand All @@ -98,10 +97,10 @@ DIRECTORIES := $(DL_DIR) $(TOOLS_DIR)
export RM := rm

# import macros that are OS specific
include $(MAKE_SCRIPT_DIR)/$(OSFAMILY).mk
include $(ROOT)/make/$(OSFAMILY).mk

# include the tools makefile
include $(MAKE_SCRIPT_DIR)/tools.mk
include $(ROOT)/make/tools.mk

# Search path for sources
VPATH := $(SRC_DIR):$(SRC_DIR)/startup
Expand All @@ -116,7 +115,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 $(MAKE_SCRIPT_DIR)/config.mk
include $(ROOT)/make/config.mk

ifeq ($(CONFIG),)
ifeq ($(TARGET),)
Expand Down Expand Up @@ -158,8 +157,8 @@ OPTIMISE_SIZE := -Os
LTO_FLAGS := $(OPTIMISATION_BASE) $(OPTIMISE_SPEED)
endif

VPATH := $(VPATH):$(MAKE_SCRIPT_DIR)/mcu
VPATH := $(VPATH):$(MAKE_SCRIPT_DIR)
VPATH := $(VPATH):$(ROOT)/make/mcu
VPATH := $(VPATH):$(ROOT)/make

# start specific includes
ifeq ($(TARGET_MCU),)
Expand All @@ -176,10 +175,10 @@ ifneq ($(CONFIG),)
TARGET_FLAGS := $(TARGET_FLAGS) -DUSE_CONFIG
endif

include $(MAKE_SCRIPT_DIR)/mcu/$(TARGET_MCU_FAMILY).mk
include $(ROOT)/make/mcu/$(TARGET_MCU_FAMILY).mk

# openocd specific includes
include $(MAKE_SCRIPT_DIR)/openocd.mk
include $(ROOT)/make/openocd.mk

# Configure default flash sizes for the targets (largest size specified gets hit first) if flash not specified already.
ifeq ($(TARGET_FLASH_SIZE),)
Expand Down Expand Up @@ -209,7 +208,7 @@ INCLUDE_DIRS := $(INCLUDE_DIRS) \

VPATH := $(VPATH):$(TARGET_DIR)

include $(MAKE_SCRIPT_DIR)/source.mk
include $(ROOT)/make/source.mk

###############################################################################
# Things that might need changing to use different tools
Expand Down Expand Up @@ -579,7 +578,7 @@ version:
@echo $(FC_VER)

## help : print this help message and exit
help: Makefile mk/tools.mk
help: Makefile make/tools.mk
@echo ""
@echo "Makefile for the $(FORKNAME) firmware"
@echo ""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion mk/tools.mk → make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 mk/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 make/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.
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions src/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
USER_DIR = ../main
TEST_DIR = unit
ROOT = ../..
OBJECT_DIR = $(ROOT)/obj/test
OBJECT_DIR = ../../obj/test
TARGET_DIR = $(USER_DIR)/target
MAKE_SCRIPT_DIR := $(ROOT)/mk

include $(MAKE_SCRIPT_DIR)/system-id.mk
include $(ROOT)/make/system-id.mk

VPATH := $(VPATH):$(USER_DIR):$(TEST_DIR)

Expand Down Expand Up @@ -593,7 +592,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_SCRIPT_DIR)/build_verbosity.mk
include ../../make/build_verbosity.mk

# House-keeping build targets.

Expand Down

0 comments on commit 691a6aa

Please sign in to comment.