From c2dfd7b932796238996770137aff497d38deb5a1 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 29 May 2018 17:04:06 +0200 Subject: [PATCH] use := assignment for all variables using $(shell ...) in order to minimize shell calls --- App/tools/driver.makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/App/tools/driver.makefile b/App/tools/driver.makefile index 6303a9e..f8492a7 100644 --- a/App/tools/driver.makefile +++ b/App/tools/driver.makefile @@ -134,7 +134,7 @@ $(foreach v,$(sort $(basename ${BUILD_EPICS_VERSIONS})),$(eval EPICS_VERSIONS_$v # Check only version of files needed to build the module. But which are they? VERSIONCHECKFILES = $(filter-out /% -none-, $(wildcard *makefile* *Makefile* *.db *.template *.subs *.dbd *.cmd) ${SOURCES} ${DBDS} ${TEMPLATES} ${SCRIPTS} $(foreach v,3.13 3.14 3.15, ${SOURCES_$v} ${DBDS_$v})) VERSIONCHECKCMD = ${MAKEHOME}/getVersion.tcl ${VERSIONDEBUGFLAG} ${VERSIONCHECKFILES} -LIBVERSION = $(or $(filter-out test,$(shell ${VERSIONCHECKCMD} 2>/dev/null)),${USER},test) +LIBVERSION := $(or $(filter-out test,$(shell ${VERSIONCHECKCMD} 2>/dev/null)),${USER},test) VERSIONDEBUGFLAG = $(if ${VERSIONDEBUG}, -d) # Default module name is name of current directory. @@ -350,7 +350,7 @@ export DBD_SRCS #record dbd files given in DBDS RECORDS1 = $(patsubst %Record.dbd, %, $(filter-out dev%, $(filter %Record.dbd, $(notdir ${DBD_SRCS})))) #record dbd files included by files given in DBDS -RECORDS2 = $(filter-out dev%, $(shell ${MAKEHOME}/expandDBD.tcl -r $(addprefix -I, $(sort $(dir ${DBD_SRCS}))) $(realpath ${DBDS}))) +RECORDS2 := $(filter-out dev%, $(shell ${MAKEHOME}/expandDBD.tcl -r $(addprefix -I, $(sort $(dir ${DBD_SRCS}))) $(realpath ${DBDS}))) RECORDS = $(sort ${RECORDS1} ${RECORDS2}) export RECORDS @@ -658,7 +658,7 @@ MINOR=$(word 2,${MAJOR_MINOR_PATCH}) PATCH=$(word 3,${MAJOR_MINOR_PATCH}) ifneq (${MINOR},) ALLMINORS := $(shell for ((i=0;i<=${MINOR};i++));do echo $$i;done) -PREREQUISITES = $(shell ${MAKEHOME}/getPrerequisites.tcl ${INSTALL_INCLUDE} | grep -vw ${PRJ}) +PREREQUISITES := $(shell ${MAKEHOME}/getPrerequisites.tcl ${INSTALL_INCLUDE} | grep -vw ${PRJ}) ifeq (${OS_CLASS}, vxWorks) PROVIDES = ${ALLMINORS:%=--defsym __${PRJ}Lib_${MAJOR}.%=0} endif # vxWorks @@ -722,7 +722,7 @@ DBDFILES += $(patsubst %.gt,%.dbd,$(notdir $(filter %.gt,${SRCS}))) #DBDFILES += $(if $(shell cat ${SUBFUNCFILE}),${SUBFUNCFILE}) # snc location in 3.14: From latest version of module seq or fall back to globally installed snc. -SNC=$(lastword $(dir ${EPICS_BASE})seq/bin/$(EPICS_HOST_ARCH)/snc $(shell ls -dv ${EPICS_MODULES}/seq/$(or $(seq_VERSION),+([0-9]).+([0-9]).+([0-9]))/R${EPICSVERSION}/bin/${EPICS_HOST_ARCH}/snc 2>/dev/null)) +SNC := $(lastword $(dir ${EPICS_BASE})seq/bin/$(EPICS_HOST_ARCH)/snc $(shell ls -dv ${EPICS_MODULES}/seq/$(or $(seq_VERSION),+([0-9]).+([0-9]).+([0-9]))/R${EPICSVERSION}/bin/${EPICS_HOST_ARCH}/snc 2>/dev/null)) endif # 3.14