diff --git a/require-ess/tools/driver.makefile b/require-ess/tools/driver.makefile index 767be2199e558cb99cb4faf256d853191745fbeb..fa6a93dfa0d23851ea2e9be9a9e786c9d06abe35 100644 --- a/require-ess/tools/driver.makefile +++ b/require-ess/tools/driver.makefile @@ -15,20 +15,16 @@ # Therefore, it calls itself recursively. # # - First run: (see comment ## RUN 1) -# Find out what to build -# Iterate over all installed EPICS versions -# -# - Second run: (see comment ## RUN 2) # Find the sources etc. -# Include EPICS configuration files for this ${EPICSVERSION} -# Iterate over all target architectures (${T_A}) defined for this version +# Include EPICS configuration files for ${EPICSVERSION}, determined by ${EPICS_BASE} +# Iterate over all target architectures (${T_A}) defined. # -# - Third run: (see comment ## RUN 3) +# - Second run: (see comment ## RUN 2) # Check which target architectures to build. # Create O.${EPICSVERSION}_${T_A} subdirectories if necessary. # Change to O.${EPICSVERSION}_${T_A} subdirectories. # -# - Fourth run: (see comment ## RUN 4) +# - Third run: (see comment ## RUN 3) # Compile everything. # # Module names are derived from the directory name (unless overwritten @@ -71,9 +67,8 @@ EPICS_BASE=${EPICS_LOCATION} CONFIG=${EPICS_BASE}/configure ##---## In E3, we extract BASE_VERSION from EPICS_LOCATION -E3_EPICS_VERSION:=$(patsubst base-%,%,$(notdir $(EPICS_LOCATION))) +EPICSVERSION:=$(patsubst base-%,%,$(notdir $(EPICS_LOCATION))) E3_SITEMODS_PATH = -BUILD_EPICS_VERSIONS = $(E3_EPICS_VERSION) ##---## BUILDCLASSES = Linux @@ -183,28 +178,6 @@ select = $(strip $(call -select,$(strip $2),$1,$3)) str-eq = $(if $(subst x$1,,x$2),,t) # End of functions from https://github.com/markpiffer/gmtt.git -ifndef EPICSVERSION -## RUN 1 -# In source directory - -debug:: - @echo "===================== Pass 1 =====================" - @echo "BUILD_EPICS_VERSIONS = ${BUILD_EPICS_VERSIONS}" - @echo "BUILDCLASSES = ${BUILDCLASSES}" - @echo "LIBVERSION = ${LIBVERSION}" - @echo "ARCH_FILTER = ${ARCH_FILTER}" - @echo "PRJ = ${PRJ}" - -# Loop over all EPICS versions for second run. -MAKEVERSION = ${MAKE} -f ${USERMAKEFILE} LIBVERSION=${LIBVERSION} - -build install debug db_internal:: ${IGNOREFILES} - @+for VERSION in ${BUILD_EPICS_VERSIONS}; do ${MAKEVERSION} EPICSVERSION=$$VERSION $@; done - -else # EPICSVERSION -# EPICSVERSION defined -# Second or third run (see T_A branch below) - # Some TOP and EPICS_BASE tweeking necessary to work around release check in 3.14.10+. EB:=${EPICS_BASE} TOP:=${EPICS_BASE} @@ -234,7 +207,7 @@ OBJ=.o COMMON_DIR = O.${EPICSVERSION}_Common ifndef T_A -## RUN 2 +## RUN 1 # Target achitecture not yet defined # but EPICSVERSION is already known. # Still in source directory. @@ -317,9 +290,13 @@ install build debug:: @echo "MAKING EPICS VERSION ${EPICSVERSION}" debug:: - @echo "===================== Pass 2: EPICSVERSION = $(EPICSVERSION) =====================" + @echo "===================== Pass 1 =====================" + @echo "BUILDCLASSES = ${BUILDCLASSES}" + @echo "LIBVERSION = ${LIBVERSION}" + @echo "PRJ = ${PRJ}" @echo "EPICS_BASE = ${EPICS_BASE}" @echo "BUILD_ARCHS = ${BUILD_ARCHS}" + @echo "ARCH_FILTER = ${ARCH_FILTER}" @echo "EXCLUDE_ARCHS = ${EXCLUDE_ARCHS}" @echo "LIBVERSION = ${LIBVERSION}" @@ -341,7 +318,7 @@ db_internal: $$(addprefix $(COMMON_DIR)/,$$(notdir $$(patsubst %.substitutions,% else # T_A ifeq ($(filter O.%,$(notdir ${CURDIR})),) -## RUN 3 +## RUN 2 # Target architecture defined. # Still in source directory, third run. @@ -416,7 +393,7 @@ $(foreach m,$(PROCESSED_MODULES),$(eval export $m_VERSION)) debug:: - @echo "===================== Pass 3: T_A = $(T_A) =====================" + @echo "===================== Pass 2: T_A = $(T_A) =====================" @echo "BINS = $(BINS)" @echo "REQ = $(REQ)" @echo "VLIBS = $(VLIBS)" @@ -477,7 +454,7 @@ ${PRJ}_GIT_STATUS := [ $(shell git status --porcelain 2> /dev/null | grep -v "\. export ${PRJ}_GIT_STATUS else # in O.* -## RUN 4 +## RUN 3 # In O.* directory. # Add macros like USR_CFLAGS_Linux. @@ -599,7 +576,7 @@ LIBOBJS += $(addsuffix $(OBJ),$(basename ${VERSIONFILE})) endif # MODULELIB debug:: - @echo "===================== Pass 4: Build directory =====================" + @echo "===================== Pass 3: Build directory =====================" @echo "BUILDCLASSES = ${BUILDCLASSES}" @echo "OS_CLASS = ${OS_CLASS}" @echo "MODULEDBD = ${MODULEDBD}" @@ -859,4 +836,3 @@ ${DEPFILE}: ${LIBOBJS} $(USERMAKEFILE) endif # In O.* directory endif # T_A defined -endif # EPICSVERSION defined diff --git a/tests/test_build.py b/tests/test_build.py index 190caa226d7aeb85c33d3594a63452c9cce4537b..a303924742f74c57d9e5af951e76877f2b734671 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -517,7 +517,7 @@ def test_expand_db_files(wrapper): ], ) def test_arch_filter(wrapper, installed_archs, param, expected): - arch_regex = re.compile(r"Pass 3: T_A =\s*([^\s]+)") + arch_regex = re.compile(r"Pass 2: T_A =\s*([^\s]+)") wrapper.add_var_to_makefile( "CROSS_COMPILER_TARGET_ARCHS", installed_archs, modifier=""