File: RULES_MODULES

package info (click to toggle)
epics-base 7.0.8.1%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,512 kB
  • sloc: cpp: 130,870; ansic: 115,274; perl: 10,647; makefile: 3,476; yacc: 1,307; python: 594; lex: 236; sh: 108; csh: 36
file content (55 lines) | stat: -rw-r--r-- 2,453 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#*************************************************************************
# 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, unless INSTALL_LOCATION is empty
LIVE_SUBMODULES = $(subst /Makefile,, \
    $(wildcard $(addsuffix /Makefile, $(SUBMODULES))))
live = $(if $(wildcard $(INSTALL_CONFIG)/RULES_TOP),LIVE,DEAD)
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)/CONFIG_SITE \
    $(wildcard $(CONFIG)/CONFIG_SITE.local)
	$(ECHO) Creating $@ with
	$(ECHO) "    $(PARENT_MODULE) = $(INSTALL_ABSOLUTE)"
	@echo $(PARENT_MODULE) = $(INSTALL_ABSOLUTE)> $@

.PHONY: RELEASE.host

# 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))