From 57158e0cbf32989a44f2b26a2f6d7d15ea958453 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 29 Jul 2026 14:05:57 -0500 Subject: [PATCH] Update configure/CONFIG --- configure/CONFIG | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/configure/CONFIG b/configure/CONFIG index c1a4703..f22aa54 100644 --- a/configure/CONFIG +++ b/configure/CONFIG @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 1997 Argonne National Laboratory +# +# SPDX-License-Identifier: EPICS + # CONFIG - Load build configuration data # # Do not make changes to this file! @@ -8,9 +12,19 @@ RULES = $(EPICS_BASE) # RELEASE files point to other application tops include $(TOP)/configure/RELEASE -include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common + ifdef T_A --include $(TOP)/configure/RELEASE.Common.$(T_A) --include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A) + -include $(TOP)/configure/RELEASE.Common.$(T_A) + -include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A) +endif + +# Check EPICS_BASE is set properly +ifneq (file,$(origin EPICS_BASE)) + $(error EPICS_BASE must be set in a configure/RELEASE file) +else + ifeq ($(wildcard $(EPICS_BASE)/configure/CONFIG_BASE),) + $(error EPICS_BASE does not point to an EPICS installation) + endif endif CONFIG = $(RULES)/configure @@ -19,11 +33,25 @@ include $(CONFIG)/CONFIG # Override the Base definition: INSTALL_LOCATION = $(TOP) -# CONFIG_SITE files contain other build configuration settings +# CONFIG_SITE files contain local build configuration settings include $(TOP)/configure/CONFIG_SITE + +# Host-arch specific settings -include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common + ifdef T_A + # Target-arch specific settings -include $(TOP)/configure/CONFIG_SITE.Common.$(T_A) + + # Host & target specific settings -include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) endif +# Load our cfg/CONFIG* files if installing elsewhere +ifneq ($(INSTALL_LOCATION),$(TOP)) + TOP_CFG_CONFIGS := $(wildcard $(INSTALL_CFG)/CONFIG*) + ifneq ($(TOP_CFG_CONFIGS),) + include $(TOP_CFG_CONFIGS) + endif +endif +