diff --git a/src/Makefile b/src/Makefile index a088f55..0983d58 100644 --- a/src/Makefile +++ b/src/Makefile @@ -86,10 +86,7 @@ streamReferences: ../CONFIG_STREAM # create stream.dbd from all RECORDTYPES $(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM - $(PERL) ../makedbd.pl $(RECORDTYPES) > $@ -ifdef ASYN - echo "registrar(AsynDriverInterfaceRegistrar)" >> $@ -endif + $(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) $(RECORDTYPES) > $@ $(LIBRARY_DEFAULT).dbd$(DEP): ../CONFIG_STREAM echo $(LIBRARY_DEFAULT).dbd: $< > $@ diff --git a/src/makedbd.pl b/src/makedbd.pl index 97ba29e..b9757cb 100644 --- a/src/makedbd.pl +++ b/src/makedbd.pl @@ -1,9 +1,14 @@ -if (@ARGV[0] == "-3.13") { +if (@ARGV[0] eq "--with-asyn") { + shift; + $asyn = 1; +} +if (@ARGV[0] eq "-3.13") { shift; } else { print "variable(streamDebug, int)\n"; print "variable(streamError, int)\n"; print "registrar(streamRegistrar)\n"; + if ($asyn) { print "registrar(AsynDriverInterfaceRegistrar)\n"; } } print "driver(stream)\n"; for (@ARGV) {