Merged Janet's dbdcat branch
This commit is contained in:
+29
-2
@@ -46,6 +46,21 @@ 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, \
|
||||
$(DBD_SEARCH_DIRS),$(addsuffix /$(file),$(dir)))) \
|
||||
$(COMMON_DIR)/$(file))
|
||||
|
||||
DBDCAT_COMMAND = $(if $(DBDCAT_SOURCES),\
|
||||
$(CAT) $(DBDCAT_SOURCES) > $(notdir $@),\
|
||||
@echo "No input files for $(notdir $@)")
|
||||
|
||||
INSTALL_DBDS += $(addprefix $(INSTALL_DBD)/,$(DBDCAT))
|
||||
|
||||
# ---------------------------------------------------
|
||||
|
||||
DBDINC_NAME = $(patsubst %.h,%,$(patsubst %.dbd,%,$(DBDINC)))
|
||||
@@ -173,7 +188,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 +383,20 @@ $(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 $@)
|
||||
$(DBDCAT_COMMAND)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.dbd:
|
||||
$(ECHO) "Creating dbd file $(notdir $<)"
|
||||
$(ECHO) "Creating dbd file $(notdir $@)"
|
||||
@$(RM) $(notdir $@)
|
||||
$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $($*_DBD)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,6 +19,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -15,6 +15,28 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.</p>
|
||||
<h2 align="center">Changes between 3.15.0.1 and 3.15.0.2</h2>
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>Concatenated database definition files</h3>
|
||||
|
||||
<p>A series of database definition (dbd) files can now be concatenated during
|
||||
the build process into a newly-created dbd file with result being installed into
|
||||
$(INSTALL_LOCATION)/dbd without expanding it.</p>
|
||||
|
||||
<p>The following lines in an EPICS Makefile will create a file name.dbd in the
|
||||
O.Common build directory containing the contents of file1.dbd followed by
|
||||
file2.dbd then file3.dbd. The new file will then be installed into
|
||||
$(INSTALL_LOCATION)/dbd without expanding any of its include statements.</p>
|
||||
|
||||
<blockquote><pre>
|
||||
DBDCAT += name.dbd
|
||||
name_DBD += file1.dbd file2.dbd file3.dbd
|
||||
</pre></blockquote>
|
||||
|
||||
<p>The source files file1.dbd, file2.dbd and file3.dbd may be created by the
|
||||
current Makefile, be located in the parent directory or any other directory in
|
||||
the SRC_DIRS list, be specified by their full pathname, exist in the install dbd
|
||||
directory, or be found in any dbd directory linked from the application's
|
||||
RELEASE files.</p>
|
||||
|
||||
<h3>Posix: Drop SCHED_FIFO before exec() in child process</h3>
|
||||
|
||||
<p>If Base is compiled with <tt>USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES</tt>
|
||||
|
||||
@@ -34,6 +34,8 @@ if ($opt_D) {
|
||||
$dep = "\$(COMMON_DIR)/$dep";
|
||||
}
|
||||
|
||||
die "dbdExpand.pl: No input files for $opt_o\n" if !@ARGV;
|
||||
|
||||
while (@ARGV) {
|
||||
my $file = shift @ARGV;
|
||||
eval {
|
||||
|
||||
Reference in New Issue
Block a user