use perl scripts to generate files

This commit is contained in:
zimoch
2011-09-19 08:06:54 +00:00
parent 20129ea341
commit 78e6c9355c

View File

@ -1,3 +1,4 @@
first: stream.dbd build
include /ioc/tools/driver.makefile include /ioc/tools/driver.makefile
EXCLUDE_VERSIONS = 3.13.2 EXCLUDE_VERSIONS = 3.13.2
PROJECT=stream2 PROJECT=stream2
@ -8,6 +9,8 @@ BUILDCLASSES += Linux
DBDS = stream.dbd DBDS = stream.dbd
BUSSES += AsynDriver BUSSES += AsynDriver
BUSSES += Dummy
FORMATS += Enum FORMATS += Enum
FORMATS += BCD FORMATS += BCD
FORMATS += Raw FORMATS += Raw
@ -46,27 +49,12 @@ endif
StreamCore.o: streamReferences StreamCore.o: streamReferences
streamReferences: streamReferences:
@for i in $(BUSSES); \ perl ../src/makeref.pl Interface $(BUSSES) > $@
do echo "extern void* ref_$${i}Interface;"; \ perl ../src/makeref.pl Converter $(FORMATS) >> $@
echo "void* p$$i = ref_$${i}Interface;"; \
done > $@
@for i in $(FORMATS); \
do echo "extern void* ref_$${i}Converter;"; \
echo "void* p$$i = ref_$${i}Converter;"; \
done >> $@
ifeq (${EPICS_BASETYPE},3.13)
stream.dbd: stream.dbd:
@for r in $(RECORDTYPES); \ perl src/makedbd.pl $(RECORDTYPES) > $@
do echo "device($$r,INST_IO,dev$${r}Stream,\"stream\")"; \
done > $@ clean::
@echo "driver(stream)" >> $@ rm -rf stream.dbd
else
stream.dbd:
@for r in $(RECORDTYPES) calcout; \
do echo "device($$r,INST_IO,dev$${r}Stream,\"stream\")"; \
done > $@
@echo "driver(stream)" >> $@
@echo "variable(streamDebug, int)" >> $@
@echo "registrar(streamRegistrar)" >> $@
endif