From 53c5aaa9ee42d2612f464558c6c6d8cfbe85113f Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 31 Mar 2013 00:38:20 -0500 Subject: [PATCH] Introduce the .dbd.pod extension Rules to convert to .html and .dbd Rename existing files Fix various build rules to match. --- configure/RULES.Db | 13 +++++++++---- src/ioc/bpt/Makefile | 2 ++ .../{menuConvert.dbd => menuConvert.dbd.pod} | 18 +++++++++++++++--- src/ioc/db/RULES | 17 ++++++++++++++--- ...menuAlarmSevr.dbd => menuAlarmSevr.dbd.pod} | 3 ++- src/ioc/db/{menuSimm.dbd => menuSimm.dbd.pod} | 15 ++++++++++++--- .../filters/{filters.dbd => filters.dbd.pod} | 0 src/std/rec/Makefile | 2 +- .../rec/{aSubRecord.dbd => aSubRecord.dbd.pod} | 0 src/std/rec/{aiRecord.dbd => aiRecord.dbd.pod} | 0 ...mpressRecord.dbd => compressRecord.dbd.pod} | 0 ...veformRecord.dbd => waveformRecord.dbd.pod} | 0 src/std/softIoc/RULES | 4 ++-- src/tools/dbdToHtml.pl | 8 ++++---- 14 files changed, 61 insertions(+), 21 deletions(-) rename src/ioc/bpt/{menuConvert.dbd => menuConvert.dbd.pod} (66%) rename src/ioc/db/{menuAlarmSevr.dbd => menuAlarmSevr.dbd.pod} (87%) rename src/ioc/db/{menuSimm.dbd => menuSimm.dbd.pod} (57%) rename src/std/filters/{filters.dbd => filters.dbd.pod} (100%) rename src/std/rec/{aSubRecord.dbd => aSubRecord.dbd.pod} (100%) rename src/std/rec/{aiRecord.dbd => aiRecord.dbd.pod} (100%) rename src/std/rec/{compressRecord.dbd => compressRecord.dbd.pod} (100%) rename src/std/rec/{waveformRecord.dbd => waveformRecord.dbd.pod} (100%) diff --git a/configure/RULES.Db b/configure/RULES.Db index 5d1e0622a..0cf703e5f 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -13,6 +13,7 @@ SUBST_SUFFIX ?= .substitutions ##################################################### vpath +vpath %.pod $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD)) vpath %.dbd $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD)) vpath %.db $(USR_VPATH) $(SRC_DIRS) $(dir $(DB)) vpath %.vdb $(USR_VPATH) $(SRC_DIRS) $(dir $(DB)) @@ -216,7 +217,11 @@ menu%.h$(DEP): menu%.dbd @$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@ @echo "$(COMMONDEP_TARGET): ../Makefile" >> $@ -menu%.h$(DEP): ../menu%.dbd +%.dbd$(DEP): %.dbd.pod + @$(RM) $@ + @$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@ + @echo "$(COMMONDEP_TARGET): ../Makefile" >> $@ + @$(RM) $@ @$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@ @echo "$(COMMONDEP_TARGET): ../Makefile" >> $@ @@ -351,9 +356,9 @@ $(COMMON_DIR)/bpt%.dbd: bpt%.data $(MAKEBPT) $< $(notdir $@) @$(MV) $(notdir $@) $@ -$(COMMON_DIR)/bpt%.dbd: ../bpt%.data +$(COMMON_DIR)/%.dbd: %.dbd.pod @$(RM) $(notdir $@) - $(MAKEBPT) $< $(notdir $@) + $(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $< @$(MV) $(notdir $@) $@ $(COMMON_DIR)/%.dbd: %Include.dbd @@ -397,7 +402,7 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file)))) ##################################################### HTML files -$(COMMON_DIR)/%.html: %.dbd $(TOOLS)/dbdToHtml.pl +$(COMMON_DIR)/%.html: %.dbd.pod $(TOOLS)/dbdToHtml.pl @$(RM) $(notdir $@) $(PERL) $(TOOLS)/dbdToHtml.pl $(DBDFLAGS) -o $(notdir $@) $< @$(MV) $(notdir $@) $@ diff --git a/src/ioc/bpt/Makefile b/src/ioc/bpt/Makefile index 7ed83ae9e..b8d73345f 100644 --- a/src/ioc/bpt/Makefile +++ b/src/ioc/bpt/Makefile @@ -25,3 +25,5 @@ PROD_HOST += makeBpt makeBpt_SRCS = makeBpt +HTMLS += menuConvert.html + diff --git a/src/ioc/bpt/menuConvert.dbd b/src/ioc/bpt/menuConvert.dbd.pod similarity index 66% rename from src/ioc/bpt/menuConvert.dbd rename to src/ioc/bpt/menuConvert.dbd.pod index 1e1e16c4c..e81d4e6f2 100644 --- a/src/ioc/bpt/menuConvert.dbd +++ b/src/ioc/bpt/menuConvert.dbd.pod @@ -1,12 +1,24 @@ #************************************************************************* -# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found +# EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* + +=head1 Menu menuConvert + +This menu defines the standard analog conversions which are included with Base. +IOC applications may add choices or replace the later choices in this menu, +although the first three choices must not be renamed or moved to different +positions. The breakpoint table name must exactly match the choice string +listed here. + +=menu menuConvert + +=cut + menu(menuConvert) { choice(menuConvertNO_CONVERSION,"NO CONVERSION") choice(menuConvertSLOPE,"SLOPE") diff --git a/src/ioc/db/RULES b/src/ioc/db/RULES index 36eee734a..8c8c4d7b9 100644 --- a/src/ioc/db/RULES +++ b/src/ioc/db/RULES @@ -11,12 +11,23 @@ # This is a Makefile fragment, see src/ioc/Makefile. -dbCommon.h$(DEP): $(IOCDIR)/db/dbCommonRecord.dbd +dbCommon.h$(DEP): ../db/dbCommonRecord.dbd ../db/RULES @$(RM) $@ @$(DBTORECORDTYPEH) -D -I ../db -o $(COMMONDEP_TARGET) $< > $@ - @echo "$(COMMONDEP_TARGET): ../Makefile" >> $@ + @echo "$(COMMONDEP_TARGET):" >> $@ -$(COMMON_DIR)/dbCommon.h: $(IOCDIR)/db/dbCommonRecord.dbd +$(COMMON_DIR)/dbCommon.h: ../db/dbCommonRecord.dbd @$(RM) $(notdir $@) $(DBTORECORDTYPEH) -I ../db -o $(notdir $@) $< @$(MV) $(notdir $@) $@ + +menuGlobal.dbd$(DEP): ../db/RULES + @$(RM) $@ + @echo "$(COMMONDEP_TARGET):" > $@ + +$(COMMON_DIR)/menuGlobal.dbd: ../db/Makefile + @$(RM) $(notdir $@) + $(PERL) $(TOOLS)/makeIncludeDbd.pl $(menuGlobal_DBD) $(notdir $@) + @$(MV) $(notdir $@) $@ + + diff --git a/src/ioc/db/menuAlarmSevr.dbd b/src/ioc/db/menuAlarmSevr.dbd.pod similarity index 87% rename from src/ioc/db/menuAlarmSevr.dbd rename to src/ioc/db/menuAlarmSevr.dbd.pod index 8287bf86e..1d86edba6 100644 --- a/src/ioc/db/menuAlarmSevr.dbd +++ b/src/ioc/db/menuAlarmSevr.dbd.pod @@ -10,7 +10,8 @@ =head1 Menu menuAlarmSevr This menu defines the four possible alarm severities that EPICS records can -exhibit. +exhibit. Note that it is not possible to add or remove severities just by +changing the choices defined here. =menu menuAlarmSevr diff --git a/src/ioc/db/menuSimm.dbd b/src/ioc/db/menuSimm.dbd.pod similarity index 57% rename from src/ioc/db/menuSimm.dbd rename to src/ioc/db/menuSimm.dbd.pod index 8021a9512..5df087ccc 100644 --- a/src/ioc/db/menuSimm.dbd +++ b/src/ioc/db/menuSimm.dbd.pod @@ -1,12 +1,21 @@ #************************************************************************* -# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found +# EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* + +=head1 Menu menuSimm + +This menu is used for Simulation Mode (SIMM) fields of input record types that +can fetch either raw or engineering values through their SIOL link. + +=menu menuSimm + +=cut + menu(menuSimm) { choice(menuSimmNO,"NO") choice(menuSimmYES,"YES") diff --git a/src/std/filters/filters.dbd b/src/std/filters/filters.dbd.pod similarity index 100% rename from src/std/filters/filters.dbd rename to src/std/filters/filters.dbd.pod diff --git a/src/std/rec/Makefile b/src/std/rec/Makefile index a5c6c4499..9213b551f 100644 --- a/src/std/rec/Makefile +++ b/src/std/rec/Makefile @@ -51,4 +51,4 @@ stdRecords_DBD = $(patsubst %,%.dbd,$(stdRecords)) dbRecStd_SRCS += $(patsubst %,%.c,$(stdRecords)) -HTMLS = $(patsubst %,%.html,$(stdRecords)) +HTMLS += $(patsubst %.dbd.pod,%.html,$(notdir $(wildcard $(STDDIR)/rec/*Record.dbd.pod))) diff --git a/src/std/rec/aSubRecord.dbd b/src/std/rec/aSubRecord.dbd.pod similarity index 100% rename from src/std/rec/aSubRecord.dbd rename to src/std/rec/aSubRecord.dbd.pod diff --git a/src/std/rec/aiRecord.dbd b/src/std/rec/aiRecord.dbd.pod similarity index 100% rename from src/std/rec/aiRecord.dbd rename to src/std/rec/aiRecord.dbd.pod diff --git a/src/std/rec/compressRecord.dbd b/src/std/rec/compressRecord.dbd.pod similarity index 100% rename from src/std/rec/compressRecord.dbd rename to src/std/rec/compressRecord.dbd.pod diff --git a/src/std/rec/waveformRecord.dbd b/src/std/rec/waveformRecord.dbd.pod similarity index 100% rename from src/std/rec/waveformRecord.dbd rename to src/std/rec/waveformRecord.dbd.pod diff --git a/src/std/softIoc/RULES b/src/std/softIoc/RULES index 393afc36d..407b94c70 100644 --- a/src/std/softIoc/RULES +++ b/src/std/softIoc/RULES @@ -7,9 +7,9 @@ # This is a Makefile fragment, see src/ioc/Makefile. -base.dbd$(DEP): $(COMMON_DIR)/stdRecords.dbd +base.dbd$(DEP): $(COMMON_DIR)/stdRecords.dbd $(COMMON_DIR)/filters.dbd softIoc.dbd$(DEP): $(COMMON_DIR)/base.dbd -$(COMMON_DIR)/base.dbd: $(COMMON_DIR)/stdRecords.dbd +$(COMMON_DIR)/base.dbd: $(COMMON_DIR)/stdRecords.dbd $(COMMON_DIR)/filters.dbd $(COMMON_DIR)/softIoc.dbd: $(COMMON_DIR)/base.dbd softMain$(DEP): epicsInstallDir.h diff --git a/src/tools/dbdToHtml.pl b/src/tools/dbdToHtml.pl index 1678d3506..52772f525 100644 --- a/src/tools/dbdToHtml.pl +++ b/src/tools/dbdToHtml.pl @@ -24,18 +24,18 @@ my $tool = 'dbdToHtml'; use vars qw($opt_D @opt_I $opt_o); getopts('DI@o:') or - die "Usage: $tool [-D] [-I dir] [-o file.html] file.dbd\n"; + die "Usage: $tool [-D] [-I dir] [-o file.html] file.dbd.pod\n"; my $dbd = DBD->new(); my $infile = shift @ARGV; -$infile =~ m/\.dbd$/ or - die "$tool: Input file '$infile' must have '.dbd' extension\n"; +$infile =~ m/\.dbd.pod$/ or + die "$tool: Input file '$infile' must have '.dbd.pod' extension\n"; &ParseDBD($dbd, &Readfile($infile, 0, \@opt_I)); if (!$opt_o) { - ($opt_o = $infile) =~ s/\.dbd$/.html/; + ($opt_o = $infile) =~ s/\.dbd.pod$/.html/; $opt_o =~ s/^.*\///; $opt_o =~ s/dbCommonRecord/dbCommon/; }