Modified for release 1.5

This commit is contained in:
Andrew Johnson
2008-11-10 20:47:06 +00:00
parent 97ccca5474
commit 02d21255f5
+13 -13
View File
@@ -10,25 +10,25 @@
<h1>msi: Macro Substitution and Include Tool</h1>
<blockquote>
<p>Version 1.4, June 2004<br>
Marty Kraimer (Advanced Photon Source, Argonne National Laboratory)</p>
<p>Version 1.5, 10th November, 2008</p>
</blockquote>
<h2>Introduction</h2>
<p>msi is a general purpose macro substitution/include tool. It accepts as
input an ascii template file. It looks for lines containing two reserved
command names: include and substitute. It also looks for and performs
substitutions on macros of the form $(var) and ${var}. It uses macLib, an EPICS
Base library created by William Lupton, to perform the substitutions.</p>
<p>msi is a general purpose macro substitution/include tool. It accepts as input
an ascii template file. It looks for lines containing two reserved command
names: <tt>include</tt> and <tt>substitute</tt>. It also looks for and performs
substitutions on macros of the form $(var) and ${var}. It uses the macLib
routines from EPICS Base to perform the substitutions, so it also accepts the
default value and value definition syntax that macLib implements.</p>
<p>msi also allows substitutions to be specified via a separate substitution
file. This substitution file allows the same format as the substitution files
accepted by dbLoadTemplate or subtool.</p>
accepted by the EPICS IOC's dbLoadTemplate command.</p>
<h2>Command Syntax:</h2>
<pre>msi -V -ofile -Idir -Msub -Ssubfile template</pre>
<pre>msi -V -o<i>outfile</i> -I<i>dir</i> -M<i>subs</i> -S<i>subfile</i> <i>template</i></pre>
<p>All parameters are optional. The -o, -I, -M, and -S switches may be
separated from their associated value string by spaces if desired. Output will
@@ -52,14 +52,14 @@ be written to stdout unless the -o option is given.</p>
include commands. For example:
<blockquote>
<pre>msi -I "/home/phoebus/MRK/examples:." -I".." template</pre>
<pre>msi -I /home/mrk/examples:. -I.. template</pre>
</blockquote>
specifies that all named files should be searched for in the following
locations in the order given:
<ol>
<li><tt>/home/phoebus/MRK/examples</tt></li>
<li><tt>/home/mrk/examples</tt></li>
<li><tt>.</tt> (the current directory)</li>
<li><tt>..</tt> (the parent of the current directory)</li>
</ol>
@@ -146,13 +146,13 @@ will generate warning messages on stderr and result in undefined output.</p>
<p>The template file is read and processed one line at a time, where the
maximum length of a line before and/or after macro expansion is 1023 characters
&#8212; longer input or output lines will cause msi to fail. Within the context
&mdash; longer input or output lines will cause msi to fail. Within the context
of a single line, macro expansion does not occur when the variable instance
appears inside a single-quoted string, or where the dollar sign <tt>$</tt> is
preceded by a back-slash character <tt>\</tt>, but as with the standard Unix
shells, variables inside double quoted strings are expanded properly.</p>
<p>However neither back-slash characters nor quotes or either variety are
<p>However neither back-slash characters nor quotes of either variety are
removed when generating the output file, so depending on what is being output
the single quote behaviour may not be useful and may even be a hinderance. It
cannot be disabled in the current version of msi.</p>