Fixed config importation in Makefile.

This commit is contained in:
Ulysse Cura 2026-09-24 23:30:03 +02:00
parent 4a00e9f6d4
commit c8c6620ba7
1 changed files with 9 additions and 9 deletions

View File

@ -4,6 +4,15 @@ SHELL = /usr/bin/env bash
ROOT := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
# Import config
ifeq ($(filter clean-all,$(MAKECMDGOALS)),)
ifneq ($(realpath $(ROOT)/config.mk), $(ROOT)/config.mk)
$(error ERROR: Please run the configure script before building)
endif
include $(ROOT)/config.mk
endif
#
# User settings
#
@ -39,15 +48,6 @@ endif
# End
#
# Import config
ifeq ($(filter clean-all,$(MAKECMDGOALS)),)
ifneq ($(realpath $(ROOT)/config.mk), $(ROOT)/config.mk)
$(error ERROR: Please run the configure script before building)
endif
include $(ROOT)/config.mk
endif
# Relocate vars
BUILD_DIR := $(ROOT)/$(BUILD_DIR)/$(TARGET_HOST)