From 32eeb9aad860f387ccaa983289a0c8a1d26a40e7 Mon Sep 17 00:00:00 2001 From: zimoch Date: Tue, 19 Aug 2014 09:19:13 +0000 Subject: [PATCH] have each subRecord function only once --- App/tools/driver.makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/App/tools/driver.makefile b/App/tools/driver.makefile index 8c75b5c..5316499 100644 --- a/App/tools/driver.makefile +++ b/App/tools/driver.makefile @@ -1,6 +1,6 @@ # driver.makefile # -# $Header: /cvs/G/DRV/misc/App/tools/driver.makefile,v 1.98 2014/08/19 09:11:04 zimoch Exp $ +# $Header: /cvs/G/DRV/misc/App/tools/driver.makefile,v 1.99 2014/08/19 09:19:13 zimoch Exp $ # # This generic makefile compiles EPICS code (drivers, records, snl, ...) # for all installed EPICS versions in parallel. @@ -837,11 +837,10 @@ SNCFLAGS += -r # Create dbd file with references to all subRecord functions ${SUBFUNCFILE}: $(filter %.c %.cc %.C %.cpp, $(SRCS)) - @echo generating $@ awk '/^[\t ]*static/ {next} /\([\t ]*(struct)?[\t ]*(genSub|sub|aSub)Record[\t ]*\*[\t ]*\w+[\t ]*\)/ {\ - match ($$0,/(\w+)[\t ]*\([\t ]*(struct)?[\t ]*\w+Record[\t ]*\*[\t ]*\w+[\t ]*\)/, a);\ - print "function (" a[1] ")"\ - }' $^ > $@ + match ($$0,/(\w+)[\t ]*\([\t ]*(struct)?[\t ]*\w+Record[\t ]*\*[\t ]*\w+[\t ]*\)/, a);\ + n=a[1];if(!f[n]){f[n]=1;print "function (" n ")"}\ + }' $^ > $@ # The original 3.13 munching rule does not really work well ifeq (${EPICS_BASETYPE},3.13)