From 507a8229deaeffacb0c3b1e6d851863a1e4a3bb5 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Thu, 22 Aug 2019 11:10:46 +0200 Subject: [PATCH] fix generation of stream-calcout.dbd: older EPICS versions have no CAT macro and we don't want duplicate registrations --- src/Makefile | 10 +++++----- src/makedbd.pl | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index 19c5489..79926e5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -100,7 +100,7 @@ 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 > $@ + $(PERL) ../makedbd.pl --rec-only scalcout > $@ $(LIBRARY_DEFAULT)-scalcout.dbd$(DEP): ../CONFIG_STREAM echo $(LIBRARY_DEFAULT)-scalcout.dbd: $< > $@ @@ -109,8 +109,8 @@ 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) $? > $@ +$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM + $(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) $(RECORDTYPES) > $@ -$(LIBRARY_DEFAULT).dbd$(DEP): - echo "$(LIBRARY_DEFAULT).dbd: $(STREAM_DBD_FILES)" > $@ +$(LIBRARY_DEFAULT).dbd$(DEP): ../CONFIG_STREAM + echo $(LIBRARY_DEFAULT).dbd: $< > $@ diff --git a/src/makedbd.pl b/src/makedbd.pl index b9757cb..b9439d8 100644 --- a/src/makedbd.pl +++ b/src/makedbd.pl @@ -1,3 +1,6 @@ +if (@ARGV[0] eq "--rec-only") { + shift; +} else { if (@ARGV[0] eq "--with-asyn") { shift; $asyn = 1; @@ -11,6 +14,7 @@ if (@ARGV[0] eq "-3.13") { if ($asyn) { print "registrar(AsynDriverInterfaceRegistrar)\n"; } } print "driver(stream)\n"; +} for (@ARGV) { print "device($_,INST_IO,dev${_}Stream,\"stream\")\n"; }