Files
epics-base/configure/RULES_MODULES
Andrew Johnson 191ff137f1 configure: Use GNU Make's abspath instead of fullPathname.pl
Add new INSTALL_ABSOLUTE variable, remove duplicates.
2021-11-25 13:27:35 -06:00

55 lines
2.3 KiB
Plaintext

#*************************************************************************
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# Support modules can use these rules to build submodules too.
#
# The requirements to do so are:
# 1. Create a file CONFIG_SITE.local in the same directory as the
# Makefile, which defines these variables (the last one is empty):
# PARENT_MODULE - The name submodules call their parent
# INSTALL_LOCATION := $($(PARENT_MODULE))
# CONFIG_INSTALLS =
# 2. The Makefile must set TOP and include $(TOP)/configure/CONFIG and
# CONFIG_SITE.local
# 3. Submodules are added to the SUBMODULES variable in the Makefile
# 4. Dependencies between submodules must be set using
# <name>_DEPEND_DIRS = <prerequisites>
# 5. The Makefile must end by including $(TOP)/configure/RULES_MODULES
# 6. Submodules must have a configure/RELEASE file that contains
# -include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
# 7. Submodules must have a configure/CONFIG_SITE file that contains
# -include $(TOP)/../CONFIG_SITE.local
# Add checked-out submodules to DIRS
LIVE_SUBMODULES = $(subst /Makefile,,$(wildcard $(addsuffix /Makefile, $(SUBMODULES))))
DIRS += $(LIVE_SUBMODULES)
include $(CONFIG)/RULES_DIRS
RELEASE_LOCAL := RELEASE.$(EPICS_HOST_ARCH).local
# Ensure that RELEASE.<host>.local exists before doing anything else
all host $(DIRS) $(ARCHS) $(ACTIONS) $(dirActionTargets) $(dirArchTargets) \
$(dirActionArchTargets) $(actionArchTargets): | $(RELEASE_LOCAL)
# Convenience target
RELEASE.host: $(RELEASE_LOCAL)
$(RELEASE_LOCAL): Makefile CONFIG_SITE.local
$(ECHO) Creating $@ with
$(ECHO) " $(PARENT_MODULE) = $(INSTALL_ABSOLUTE)"
@echo $(PARENT_MODULE) = $(INSTALL_ABSOLUTE)> $@
realclean:
$(RM) $(wildcard RELEASE.*.local)
.PHONY: RELEASE.host realclean
# Testing: Combine test failure logs from the live submodules
TESTS_FAILED_LOGS = $(wildcard $(addsuffix /$(TESTS_FAILED_LOG), \
$(LIVE_SUBMODULES)))
runtests test-results: % : | $(addsuffix $(DIVIDER)%, $(LIVE_SUBMODULES))
$(if $(TESTS_FAILED_LOGS), \
@$(CAT) $(TESTS_FAILED_LOGS)>> $(TESTS_FAILED_PATH))