diff --git a/configure/RULES.Db b/configure/RULES.Db index 6a01ad19b..83058eb88 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -46,6 +46,17 @@ DBD += $(foreach type, $(CROSS_TARGET_OS_TYPES), $(DBD_$(type))) # DBD_RTEMS += abcRTEMS.dbd # DBD_solaris += abcSolaris.dbd # +# --------------------------------------------------- +# DBD concatination files + +COMMON_DBDCATS += $(addprefix $(COMMON_DIR)/,$(DBDCAT)) +DBDCAT_SOURCES += $(foreach file, $($*_DBD), $(DBDCAT_SOURCE) ) +DBDCAT_SOURCE = $(firstword $(wildcard $(file) $(foreach dir, \ + $(GENERIC_SRC_DIRS),$(addsuffix /$(file),$(dir)))) \ + $(COMMON_DIR)/$(file)) + +INSTALL_DBDS += $(addprefix $(INSTALL_DBD)/,$(DBDCAT)) + # --------------------------------------------------- DBDINC_NAME = $(patsubst %.h,%,$(patsubst %.dbd,%,$(DBDINC))) @@ -173,7 +184,7 @@ endif inc : $(COMMON_INC) $(INSTALL_INC) -build : $(COMMON_DBDS) $(COMMON_DBS) \ +build : $(COMMON_DBDS) $(COMMON_DBS) $(COMMON_DBDCATS) \ $(INSTALL_DBDS) $(INSTALL_DBS) \ $(DBDDEPENDS_FILES) $(TARGETS) \ $(INSTALL_DB_INSTALLS) $(INSTALL_DBD_INSTALLS) @@ -368,8 +379,21 @@ $(COMMON_DIR)/%.dbd: ../%Include.dbd $(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $< @$(MV) $(notdir $@) $@ +# Make DBDCAT file x depend on x_DBD source files +define DBDCAT_template +$$(COMMON_DIR)/$(1).dbd : ../Makefile $$(foreach file, $$($(1)_DBD),$$(DBDCAT_SOURCE) ) +endef +$(foreach name,$(subst .dbd,,$(DBDCAT)), $(eval $(call DBDCAT_template,$(name)))) + +$(COMMON_DBDCATS):$(COMMON_DIR)/%.dbd: + $(ECHO) "Creating dbd file $(notdir $@)" + @$(RM) $(notdir $@) + $(CAT) $(DBDCAT_SOURCES) > $(notdir $@) + #@$(CAT) $^ > $(notdir $@) + @$(MV) $(notdir $@) $@ + $(COMMON_DIR)/%.dbd: - $(ECHO) "Creating dbd file $(notdir $<)" + $(ECHO) "Creating dbd file $(notdir $@)" @$(RM) $(notdir $@) $(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $($*_DBD) @$(MV) $(notdir $@) $@ diff --git a/configure/os/CONFIG.UnixCommon.Common b/configure/os/CONFIG.UnixCommon.Common index 13044f914..6f3e81bc1 100644 --- a/configure/os/CONFIG.UnixCommon.Common +++ b/configure/os/CONFIG.UnixCommon.Common @@ -13,6 +13,7 @@ MV = mv RM = rm -f MKDIR = mkdir RMDIR = rm -rf +CAT = cat # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.UnixCommon.Common diff --git a/configure/os/CONFIG.win32-x86.Common b/configure/os/CONFIG.win32-x86.Common index b30c9a69f..42937222d 100644 --- a/configure/os/CONFIG.win32-x86.Common +++ b/configure/os/CONFIG.win32-x86.Common @@ -16,6 +16,7 @@ RM = $(PERL) -MExtUtils::Command -e rm_f MKDIR = $(PERL) -MExtUtils::Command -e mkpath RMDIR = $(PERL) -MExtUtils::Command -e rm_rf NOP = $(PERL) -e '' +CAT = $(PERL) -MExtUtils::Command -e cat WIND_HOST_TYPE = x86-win32 OSITHREAD_USE_DEFAULT_STACK = NO diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index db20d167c..84c2b4be7 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -15,6 +15,24 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.
Database definition (dbd) files can now be concatenated during the EPICS build +into a created dbd file with the created dbd file then installed into +$(INSTALL_LOCATION)/dbd. The following lines in a Makefile will create a name.dbd +file containing a copy of lines from file1.dbd followed by lines from file2.dbd +then file3.dbd and then install name.dbd into $(INSTALL_LOCATION)/dbd. NO dbd file +expansions will be done. + +
+ +The files file1.dbd, file2.dbd, and file3.dbd will be found if they exist in the +current directory, are created by the current Makefile, have fullpath name ,or +exist in a directory of the currently defined SRC_DIRS list. ++ DBDCAT += name.dbd + name_DBD += file1.dbd file2.dbd file3.dbd +
On POSIX systems, an IOC application's ability to meet timing deadlines is often diff --git a/src/tools/dbdExpand.pl b/src/tools/dbdExpand.pl index c9e10aa51..0f117bf70 100755 --- a/src/tools/dbdExpand.pl +++ b/src/tools/dbdExpand.pl @@ -34,6 +34,8 @@ if ($opt_D) { $dep = "\$(COMMON_DIR)/$dep"; } +exit 0 if (!@ARGV); + while (@ARGV) { my $file = shift @ARGV; eval {