Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: Inter-module dependency between stream and calc
From: "Konrad, Martin via Tech-talk" <tech-talk@aps.anl.gov>
To: "Johnson, Andrew N." <anj@anl.gov>, "Zimoch Dirk (PSI)" <dirk.zimoch@psi.ch>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 19 Mar 2019 18:04:10 +0000
Hi,
> All I think we need to allow that is for you to provide a separate 
> streamScalcout.dbd file that includes that device entry when the 
> build sees that CALC or SYNAPPS defined, and for that device() entry 
> to be excluded from the main stream.dbd file.
I actually tried that yesterday and it works fine for me. Please see the
attached patch. Dirk, I would appreciate if you could include this. Note
that I currently do not have plans to patch this into the Debian package
in case this doesn't make it into the official repo. I don't want the
Debian packaged version to use different DBD file names than the
upstream module (to avoid confusion).

Thanks,

Martin

-- 
Martin Konrad
High Performance Controls Team Leader
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: konrad@frib.msu.edu
From aa083278511d7046f3f4bedd76f1f19476767e4c Mon Sep 17 00:00:00 2001
From: Martin Konrad <konrad@frib.msu.edu>
Date: Mon, 18 Mar 2019 15:49:30 -0400
Subject: [PATCH] Create separate DBD files for use without CALC

This allows IOCs that don't use the StreamDevice support for
sCalcRecord to use StreamDevice without linking against the CALC
module.

Gbp-Pq: Name 0006-Create-separate-DBD-files-for-use-without-CALC.patch
---
 src/Makefile | 34 +++++++++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 0983d58..646f052 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -35,6 +35,10 @@ endif
 LIBRARY_DEFAULT = stream
 
 DBD += $(LIBRARY_DEFAULT).dbd
+DBD += $(LIBRARY_DEFAULT)-base.dbd
+ifdef CALC
+DBD += $(LIBRARY_DEFAULT)-scalcout.dbd
+endif
 
 ifdef ASYN
 LIB_LIBS += asyn
@@ -84,9 +88,29 @@ streamReferences: ../CONFIG_STREAM
 	$(PERL) ../makeref.pl Interface $(BUSSES) > $@
 	$(PERL) ../makeref.pl Converter $(FORMATS) >> $@
 
-# create stream.dbd from all RECORDTYPES
-$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM
-	$(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) $(RECORDTYPES) > $@
+# create stream-base.dbd from all RECORDTYPES except scalcout record
+$(COMMON_DIR)/$(LIBRARY_DEFAULT)-base.dbd: ../CONFIG_STREAM
+	$(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) $(filter-out scalcout, $(RECORDTYPES)) > $@
+
+$(LIBRARY_DEFAULT)-base.dbd$(DEP): ../CONFIG_STREAM
+	echo $(LIBRARY_DEFAULT)-base.dbd: $< > $@
+
+STREAM_DBD_FILES = $(LIBRARY_DEFAULT)-base.dbd
+
+ifdef CALC
+# create stream-scalcout.dbd for scalcout record
+$(COMMON_DIR)/$(LIBRARY_DEFAULT)-scalcout.dbd: ../CONFIG_STREAM
+	$(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) scalcout > $@
+
+$(LIBRARY_DEFAULT)-scalcout.dbd$(DEP): ../CONFIG_STREAM
+	echo $(LIBRARY_DEFAULT)-scalcout.dbd: $< > $@
+
+STREAM_DBD_FILES += $(LIBRARY_DEFAULT)-scalcout.dbd
+endif
+
+# create stream.dbd for all record types
+$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: $(addprefix $(COMMON_DIR)/, $(STREAM_DBD_FILES))
+	cat $? > $@
 
-$(LIBRARY_DEFAULT).dbd$(DEP): ../CONFIG_STREAM
-	echo $(LIBRARY_DEFAULT).dbd: $< > $@
+$(LIBRARY_DEFAULT).dbd$(DEP):
+	echo "$(LIBRARY_DEFAULT).dbd: $(STREAM_DBD_FILES)" > $@
-- 
2.19.1


Replies:
Re: Inter-module dependency between stream and calc Jeong Han Lee via Tech-talk
Re: Inter-module dependency between stream and calc Zimoch Dirk (PSI) via Tech-talk
References:
Inter-module dependency between stream and calc Konrad, Martin via Tech-talk
Re: Inter-module dependency between stream and calc Zimoch Dirk (PSI) via Tech-talk

Navigate by Date:
Prev: Re: StreamDevice processing issue Davis, Mark via Tech-talk
Next: Re: Inter-module dependency between stream and calc Jeong Han Lee via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
Navigate by Thread:
Prev: Re: Inter-module dependency between stream and calc Johnson, Andrew N. via Tech-talk
Next: Re: Inter-module dependency between stream and calc Jeong Han Lee via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
ANJ, 20 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·