From df96c0170a967f5366c9c58f50706021975af908 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 30 Aug 2022 14:06:30 -0500 Subject: [PATCH] Minor changes to makeBaseApp templates --- .../src/template/top/exampleApp/Makefile | 16 +++++++++++----- .../top/exampleApp/src/dev_APPNAME_Version.c | 2 +- .../template/top/exampleBoot/ioc/st.cmd@Common | 4 ++-- .../template/top/exampleBoot/ioc/st.cmd@RTEMS | 4 ++-- .../template/top/exampleBoot/ioc/st.cmd@vxWorks | 4 ++-- .../database/src/template/top/iocApp/Makefile | 16 +++++++++++----- .../src/template/top/iocBoot/ioc/st.cmd@Common | 2 +- .../src/template/top/iocBoot/ioc/st.cmd@Cross | 2 +- .../src/template/top/supportApp/Makefile | 15 +++++++++++---- 9 files changed, 42 insertions(+), 23 deletions(-) diff --git a/modules/database/src/template/top/exampleApp/Makefile b/modules/database/src/template/top/exampleApp/Makefile index 10e0126aa..60ab8ae88 100644 --- a/modules/database/src/template/top/exampleApp/Makefile +++ b/modules/database/src/template/top/exampleApp/Makefile @@ -1,8 +1,14 @@ +# Makefile at top of application tree TOP = .. include $(TOP)/configure/CONFIG -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*)) -include $(TOP)/configure/RULES_DIRS +# Directories to be built, in any order. +# You can replace these wildcards with an explicit list +DIRS += $(wildcard src* *Src*) +DIRS += $(wildcard db* *Db*) + +# If the build order matters, add dependency rules like this, +# which specifies that xxxSrc must be built after src: +#xxxSrc_DEPEND_DIRS += src + +include $(TOP)/configure/RULES_DIRS diff --git a/modules/database/src/template/top/exampleApp/src/dev_APPNAME_Version.c b/modules/database/src/template/top/exampleApp/src/dev_APPNAME_Version.c index b998e6db3..9d482af25 100644 --- a/modules/database/src/template/top/exampleApp/src/dev_APPNAME_Version.c +++ b/modules/database/src/template/top/exampleApp/src/dev_APPNAME_Version.c @@ -33,6 +33,6 @@ static long read_string(lsiRecord *prec) } static lsidset dev_CSAFEAPPNAME_Version = { - 5, NULL, NULL, NULL, NULL, read_string + {5, NULL, NULL, NULL, NULL}, read_string }; epicsExportAddress(dset,dev_CSAFEAPPNAME_Version); diff --git a/modules/database/src/template/top/exampleBoot/ioc/st.cmd@Common b/modules/database/src/template/top/exampleBoot/ioc/st.cmd@Common index b2dfb4ae4..81753860d 100644 --- a/modules/database/src/template/top/exampleBoot/ioc/st.cmd@Common +++ b/modules/database/src/template/top/exampleBoot/ioc/st.cmd@Common @@ -17,10 +17,10 @@ dbLoadRecords "db/_APPNAME_Version.db", "user=_USER_" dbLoadRecords "db/dbSubExample.db", "user=_USER_" #- Set this to see messages from mySub -#var mySubDebug 1 +#-var mySubDebug 1 #- Run this to trace the stages of iocInit -#traceIocInit +#-traceIocInit cd "${TOP}/iocBoot/${IOC}" iocInit diff --git a/modules/database/src/template/top/exampleBoot/ioc/st.cmd@RTEMS b/modules/database/src/template/top/exampleBoot/ioc/st.cmd@RTEMS index 87e9e3b13..54f2a74e7 100644 --- a/modules/database/src/template/top/exampleBoot/ioc/st.cmd@RTEMS +++ b/modules/database/src/template/top/exampleBoot/ioc/st.cmd@RTEMS @@ -15,10 +15,10 @@ dbLoadRecords("db/_APPNAME_Version.db", "user=_USER_") dbLoadRecords("db/dbSubExample.db", "user=_USER_") #- Set this to see messages from mySub -#var mySubDebug 1 +#-var mySubDebug 1 #- Run this to trace the stages of iocInit -#traceIocInit +#-traceIocInit iocInit diff --git a/modules/database/src/template/top/exampleBoot/ioc/st.cmd@vxWorks b/modules/database/src/template/top/exampleBoot/ioc/st.cmd@vxWorks index 617ba6111..1f390a862 100644 --- a/modules/database/src/template/top/exampleBoot/ioc/st.cmd@vxWorks +++ b/modules/database/src/template/top/exampleBoot/ioc/st.cmd@vxWorks @@ -24,10 +24,10 @@ dbLoadRecords "db/_APPNAME_Version.db", "user=_USER_" dbLoadRecords "db/dbSubExample.db", "user=_USER_" #- Set this to see messages from mySub -#mySubDebug = 1 +#-mySubDebug = 1 #- Run this to trace the stages of iocInit -#traceIocInit +#-traceIocInit cd startup iocInit diff --git a/modules/database/src/template/top/iocApp/Makefile b/modules/database/src/template/top/iocApp/Makefile index 10e0126aa..60ab8ae88 100644 --- a/modules/database/src/template/top/iocApp/Makefile +++ b/modules/database/src/template/top/iocApp/Makefile @@ -1,8 +1,14 @@ +# Makefile at top of application tree TOP = .. include $(TOP)/configure/CONFIG -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*)) -include $(TOP)/configure/RULES_DIRS +# Directories to be built, in any order. +# You can replace these wildcards with an explicit list +DIRS += $(wildcard src* *Src*) +DIRS += $(wildcard db* *Db*) + +# If the build order matters, add dependency rules like this, +# which specifies that xxxSrc must be built after src: +#xxxSrc_DEPEND_DIRS += src + +include $(TOP)/configure/RULES_DIRS diff --git a/modules/database/src/template/top/iocBoot/ioc/st.cmd@Common b/modules/database/src/template/top/iocBoot/ioc/st.cmd@Common index dd0811dfb..695b05a14 100644 --- a/modules/database/src/template/top/iocBoot/ioc/st.cmd@Common +++ b/modules/database/src/template/top/iocBoot/ioc/st.cmd@Common @@ -12,7 +12,7 @@ dbLoadDatabase "dbd/_APPNAME_.dbd" _CSAFEAPPNAME__registerRecordDeviceDriver pdbbase ## Load record instances -#dbLoadRecords("db/xxx.db","user=_USER_") +#dbLoadRecords("db/_APPNAME_.db","user=_USER_") cd "${TOP}/iocBoot/${IOC}" iocInit diff --git a/modules/database/src/template/top/iocBoot/ioc/st.cmd@Cross b/modules/database/src/template/top/iocBoot/ioc/st.cmd@Cross index fbe5b97ab..8303f99f5 100644 --- a/modules/database/src/template/top/iocBoot/ioc/st.cmd@Cross +++ b/modules/database/src/template/top/iocBoot/ioc/st.cmd@Cross @@ -10,7 +10,7 @@ dbLoadDatabase "../../dbd/_APPNAME_.dbd" _CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase) ## Load record instances -dbLoadRecords("../../db/_APPNAME_.db","user=_USER_") +#dbLoadRecords("../../db/_APPNAME_.db","user=_USER_") iocInit() diff --git a/modules/database/src/template/top/supportApp/Makefile b/modules/database/src/template/top/supportApp/Makefile index ab15bfb1c..60ab8ae88 100644 --- a/modules/database/src/template/top/supportApp/Makefile +++ b/modules/database/src/template/top/supportApp/Makefile @@ -1,7 +1,14 @@ +# Makefile at top of application tree TOP = .. include $(TOP)/configure/CONFIG -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*)) -DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*)) + +# Directories to be built, in any order. +# You can replace these wildcards with an explicit list +DIRS += $(wildcard src* *Src*) +DIRS += $(wildcard db* *Db*) + +# If the build order matters, add dependency rules like this, +# which specifies that xxxSrc must be built after src: +#xxxSrc_DEPEND_DIRS += src + include $(TOP)/configure/RULES_DIRS