Introduce the .dbd.pod extension

Rules to convert to .html and .dbd
Rename existing files
Fix various build rules to match.
This commit is contained in:
Andrew Johnson
2013-03-31 00:38:20 -05:00
committed by Ralph Lange
parent 880d714a0f
commit 53c5aaa9ee
14 changed files with 61 additions and 21 deletions

View File

@@ -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 $@) $@

View File

@@ -25,3 +25,5 @@ PROD_HOST += makeBpt
makeBpt_SRCS = makeBpt
HTMLS += menuConvert.html

View File

@@ -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")

View File

@@ -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 $@) $@

View File

@@ -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

View File

@@ -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")

View File

@@ -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)))

View File

@@ -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

View File

@@ -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/;
}