Merge lp:~jba-aps/epics-base/dbdcat into lp:~epics-core/epics-base/3.15

Proposed by Janet B. Anderson
Status: Merged
Merged at revision: 12533
Proposed branch: lp:~jba-aps/epics-base/dbdcat
Merge into: lp:~epics-core/epics-base/3.15
Diff against target: 154 lines (+65/-2) (has conflicts)
6 files modified
configure/RULES.Db (+29/-2)
configure/os/CONFIG.UnixCommon.Common (+1/-0)
configure/os/CONFIG.win32-x86-mingw.Common (+1/-0)
configure/os/CONFIG.win32-x86.Common (+1/-0)
documentation/RELEASE_NOTES.html (+31/-0)
src/tools/dbdExpand.pl (+2/-0)
Text conflict in documentation/RELEASE_NOTES.html
To merge this branch: bzr merge lp:~jba-aps/epics-base/dbdcat
Reviewer Review Type Date Requested Status
Andrew Johnson Approve
Review via email: mp+234009@code.launchpad.net

Description of the change

Added concatenation of database definition files with no database expansion.

To post a comment you must log in.
Revision history for this message
Andrew Johnson (anj) wrote :

RULES.Db has a commented-out line in the rule for $(COMMON_DBDCATS):$(COMMON_DIR)/%.dbd which looks like you probably didn't mean to leave it there.

Should dbdExpand print an error message when it gets run with no input files to expand? I think we should try to make it as easy as we can for users to understand what they did wrong when this happens, even though the build will fail immediately afterwards anyway with this code. I would like dbdExpand to exit with an error status in this case as well (causing GNUmake to stop immediately), so instead of exit 0 I suggest using die with a suitable message string (that ends in a newline to suppress the line-number that Perl will append to it otherwise). The message should include the name of the DBD file it was being asked to create.

lp:~jba-aps/epics-base/dbdcat updated
12528. By Janet B. Anderson

Updated concatenated database definition files

Revision history for this message
Andrew Johnson (anj) wrote :

Documentation for this branch will be part of the major updating of the AppDevGuide's Build Facility chapter that Janet has started working on.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure/RULES.Db'
2--- configure/RULES.Db 2014-03-13 20:04:31 +0000
3+++ configure/RULES.Db 2014-09-11 20:22:09 +0000
4@@ -47,6 +47,21 @@
5 # DBD_solaris += abcSolaris.dbd
6 #
7 # ---------------------------------------------------
8+# DBD concatination files
9+
10+COMMON_DBDCATS += $(addprefix $(COMMON_DIR)/,$(DBDCAT))
11+DBDCAT_SOURCES += $(foreach file, $($*_DBD), $(DBDCAT_SOURCE) )
12+DBDCAT_SOURCE = $(firstword $(wildcard $(file) $(foreach dir, \
13+ $(DBD_SEARCH_DIRS),$(addsuffix /$(file),$(dir)))) \
14+ $(COMMON_DIR)/$(file))
15+
16+DBDCAT_COMMAND = $(if $(DBDCAT_SOURCES),\
17+ $(CAT) $(DBDCAT_SOURCES) > $(notdir $@),\
18+ @echo "No input files for $(notdir $@)")
19+
20+INSTALL_DBDS += $(addprefix $(INSTALL_DBD)/,$(DBDCAT))
21+
22+# ---------------------------------------------------
23
24 DBDINC_NAME = $(patsubst %.h,%,$(patsubst %.dbd,%,$(DBDINC)))
25 DBD += $(addsuffix .dbd,$(DBDINC_NAME))
26@@ -173,7 +188,7 @@
27
28 inc : $(COMMON_INC) $(INSTALL_INC)
29
30-build : $(COMMON_DBDS) $(COMMON_DBS) \
31+build : $(COMMON_DBDS) $(COMMON_DBS) $(COMMON_DBDCATS) \
32 $(INSTALL_DBDS) $(INSTALL_DBS) \
33 $(DBDDEPENDS_FILES) $(TARGETS) \
34 $(INSTALL_DB_INSTALLS) $(INSTALL_DBD_INSTALLS)
35@@ -368,8 +383,20 @@
36 $(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $<
37 @$(MV) $(notdir $@) $@
38
39+# Make DBDCAT file x depend on x_DBD source files
40+define DBDCAT_template
41+$$(COMMON_DIR)/$(1).dbd : ../Makefile $$(foreach file, $$($(1)_DBD),$$(DBDCAT_SOURCE) )
42+endef
43+$(foreach name,$(subst .dbd,,$(DBDCAT)), $(eval $(call DBDCAT_template,$(name))))
44+
45+$(COMMON_DBDCATS):$(COMMON_DIR)/%.dbd:
46+ $(ECHO) "Creating dbd file $(notdir $@)"
47+ @$(RM) $(notdir $@)
48+ $(DBDCAT_COMMAND)
49+ @$(MV) $(notdir $@) $@
50+
51 $(COMMON_DIR)/%.dbd:
52- $(ECHO) "Creating dbd file $(notdir $<)"
53+ $(ECHO) "Creating dbd file $(notdir $@)"
54 @$(RM) $(notdir $@)
55 $(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $($*_DBD)
56 @$(MV) $(notdir $@) $@
57
58=== modified file 'configure/os/CONFIG.UnixCommon.Common'
59--- configure/os/CONFIG.UnixCommon.Common 2010-10-05 19:27:37 +0000
60+++ configure/os/CONFIG.UnixCommon.Common 2014-09-11 20:22:09 +0000
61@@ -13,6 +13,7 @@
62 RM = rm -f
63 MKDIR = mkdir
64 RMDIR = rm -rf
65+CAT = cat
66
67 # Allow site overrides
68 -include $(CONFIG)/os/CONFIG_SITE.UnixCommon.Common
69
70=== modified file 'configure/os/CONFIG.win32-x86-mingw.Common'
71--- configure/os/CONFIG.win32-x86-mingw.Common 2013-10-15 16:32:31 +0000
72+++ configure/os/CONFIG.win32-x86-mingw.Common 2014-09-11 20:22:09 +0000
73@@ -19,6 +19,7 @@
74 MKDIR = $(PERL) -MExtUtils::Command -e mkpath
75 RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
76 NOP = $(PERL) -e ''
77+CAT = $(PERL) -MExtUtils::Command -e cat
78
79 WIND_HOST_TYPE = x86-win32
80 OSITHREAD_USE_DEFAULT_STACK = NO
81
82=== modified file 'configure/os/CONFIG.win32-x86.Common'
83--- configure/os/CONFIG.win32-x86.Common 2012-07-17 19:33:31 +0000
84+++ configure/os/CONFIG.win32-x86.Common 2014-09-11 20:22:09 +0000
85@@ -16,6 +16,7 @@
86 MKDIR = $(PERL) -MExtUtils::Command -e mkpath
87 RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
88 NOP = $(PERL) -e ''
89+CAT = $(PERL) -MExtUtils::Command -e cat
90
91 WIND_HOST_TYPE = x86-win32
92 OSITHREAD_USE_DEFAULT_STACK = NO
93
94=== modified file 'documentation/RELEASE_NOTES.html'
95--- documentation/RELEASE_NOTES.html 2014-09-09 23:06:09 +0000
96+++ documentation/RELEASE_NOTES.html 2014-09-11 20:22:09 +0000
97@@ -15,6 +15,7 @@
98 <h2 align="center">Changes between 3.15.0.1 and 3.15.0.2</h2>
99 <!-- Insert new items immediately below here ... -->
100
101+<<<<<<< TREE
102 <h3>Posix: Drop SCHED_FIFO before exec() in child process</h3>
103
104 <p>If Base is compiled with <tt>USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES</tt>
105@@ -33,6 +34,36 @@
106 RAM if the process has the ability to run threads with different priorities. If
107 unsuccessful, it prints an message to stderr and continues.</p>
108
109+=======
110+<h3>Concatenated database definition files</h3>
111+
112+<p>Database definition (dbd) files can now be concatenated during the EPICS build
113+into a created dbd file with the created dbd file then installed into
114+$(INSTALL_LOCATION)/dbd. The following lines in a Makefile will create a name.dbd
115+file containing a copy of lines from file1.dbd followed by lines from file2.dbd
116+then file3.dbd and then install name.dbd into $(INSTALL_LOCATION)/dbd. NO dbd file
117+expansions will be done.
118+
119+<blockquote> <pre>
120+ DBDCAT += name.dbd
121+ name_DBD += file1.dbd file2.dbd file3.dbd
122+</pre></blockquote>
123+
124+The files file1.dbd, file2.dbd, and file3.dbd will be found if they exist in the
125+current directory, are created by the current Makefile, have fullpath name , exist
126+in a directory of the currently defined SRC_DIRS list, exist in the install dbd
127+directory, or exist in a dbd directory of a current release module..</p>
128+
129+<h3>On POSIX, attempt to lock all memory when running with FIFO scheduler</h3>
130+
131+<p>On POSIX systems, an IOC application's ability to meet timing deadlines is often
132+dependent on its ability to lock part or all of the process's virtual address space
133+into RAM, preventing that memory from being paged to the swap area. This change will
134+attempt to lock the process's virtual address space into RAM if the process has the
135+ability to run threads with different priorities. If unsuccessful, it prints an
136+message to stderr and continues.</p>
137+
138+>>>>>>> MERGE-SOURCE
139 <p>On Linux, one can grant a process the ability to run threads with different
140 priorities by using the command <code>ulimit -r unlimited</code>. To use the
141 FIFO scheduler for an IOC, use a command like this:</p>
142
143=== modified file 'src/tools/dbdExpand.pl'
144--- src/tools/dbdExpand.pl 2013-10-14 17:43:26 +0000
145+++ src/tools/dbdExpand.pl 2014-09-11 20:22:09 +0000
146@@ -34,6 +34,8 @@
147 $dep = "\$(COMMON_DIR)/$dep";
148 }
149
150+die "No input files for $opt_o" if (!@ARGV);
151+
152 while (@ARGV) {
153 my $file = shift @ARGV;
154 eval {

Subscribers

People subscribed via source and target branches