Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/wave/doc/wave_driver.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 13.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<title>The Wave Driver</title>
5<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6<link href="theme/style.css" rel="stylesheet" type="text/css">
7</head>
8
9<body>
10<table width="100%" border="0" cellspacing="2" background="theme/bkd2.gif">
11  <tr> 
12    <td width="21"> <h1></h1></td>
13    <td width="885"> <font face="Verdana, Arial, Helvetica, sans-serif"><b><font size="6">The
14      Wave Driver</font></b></font></td>
15    <td width="96"><a href="http://www.boost.org"><img src="theme/wave.gif" width="93" height="68" align="right" border="0"></a></td>
16  </tr>
17</table>
18<br>
19<table border="0">
20  <tr> 
21    <td width="10"></td>
22    <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
23    <td width="30"><a href="samples.html"><img src="theme/l_arr.gif" border="0"></a></td>
24    <td width="30"><a href="tracing_facility.html"><img src="theme/r_arr.gif" border="0"></a></td>
25  </tr>
26</table>
27<p>There is implemented a driver program for the <tt>Wave</tt> library, which
28  utilizes nearly all capabilities of the library. It is usable as a preprocessor executable
29  on top of any other C++ compiler. It outputs the textual representation of the
30  preprocessed tokens generated from a given input file. This driver program has
31  the following command line syntax:</p>
32<pre>Usage: wave [options] [@config-file(s)] file:
33 
34  Options allowed on the command line only:
35    -h [--help]:            print out program usage (this message)
36    -v [--version]:         print the version number
37    -c [--copyright]:       print out the copyright statement
38    --config-file filepath: specify a config file (alternatively: @filepath)
39 
40  Options allowed additionally in a config file:
41    -o [--output] path:          specify a file to use for output instead of stdout
42    -I [--include] path:         specify an additional include directory
43    -S [--sysinclude] syspath:   specify an additional system include directory
44    -F [--forceinclude] file:    force inclusion of the given file
45    -D [--define] macro[=[value]]:    specify a macro to define
46    -P [--predefine] macro[=[value]]: specify a macro to predefine
47    -U [--undefine] macro:       specify a macro to undefine
48    -u [--undefineall]:          undefine all macrodefinitions
49    -n [--nesting] depth:        specify a new maximal include nesting depth
50       
51  Extended options (allowed everywhere)
52    -t [--traceto] arg:          output trace info to a file [arg] or to stderr [-]
53    --timer                      output overall elapsed computing time
54    --long_long:                 enable long long support if C++ mode
55    --variadics:                 enable variadics and placemarkers in C++ mode
56    --c99:                       enable C99 mode (implies variadics and placemarkers)
57    -l [ --listincludes ] arg:   list included file to a file [arg] or to stdout [-]
58    -p [ --preserve ]:           preserve comments
59
60</pre>
61<P dir="ltr">The possible options are straightforward and self explanatory. The
62  following describes some of these options in more detail. Please note, that
63  the extended options (--c99 and --variadics) are available only, if the driver
64  was compiled with the constant <tt>WAVE_SUPPORT_VARIADICS_PLACEMARKERS</tt> 
65  defined. </P>
66<P dir="ltr">-o [--output] path</P>
67<blockquote> 
68  <p dir="ltr">Specify a filename to be used for the generated preprocessed output
69    stream. If this option is not given, then the standard output is used (stdout).</p>
70</blockquote>
71<P dir="ltr">-I [--include] option</P>
72<blockquote> 
73  <p dir="ltr">Add the directory dir to the head of the list of directories to be searched for header files. This can be used to override a system
74    header file, substituting your own version, since these directories are
75    searched before the system header file directories. However, you should
76    not use this option to add directories that contain vendor-supplied
77    system header files (use '-S' for that). If you use more than
78    one '-I' option, the directories are scanned in left-to-right order,
79  the standard system directories come after. </p>
80  <p>If a standard system include directory, or a directory specified with
81    '-S', is also specified with '-I', the '-I' option will be
82    ignored. The directory will still be searched but as a system
83    directory at its normal position in the system include chain.  </p>
84</blockquote>
85<p dir="ltr">-I- [--include-] option</p>
86<blockquote> 
87  <p dir="ltr">The <tt>Wave</tt> library maintains two separate search paths
88    for include files. A search path for user include files and a search path
89    for system include files, where the user include paths are searched before the system include paths. </p>
90  <p dir="ltr">Any directories specified with '-I' options before
91    an eventually given '-I-' option are searched only for the case of '#include&nbsp;&quot;file&quot;'
92    (user include files), they are not searched for '#include&nbsp;&lt;file&gt;'
93    directives (system include files). If additional directories are specified
94    with '-I' options after a '-I-' option was given, these directories are searched
95    for all '#include' directives (ordinarily all '-I' directories are used this way.). </p>
96  <p dir="ltr">In addition, the '-I-' option inhibits the
97    use of the current directory (where the current input file came from) as the first search directory for '#include &quot;file&quot;'
98    directives . With '-I.' you can specify searching the directory which was current when the compiler was invoked. That is not exactly the same as what the
99  preprocessor does by default, but it is often satisfactory. </p>
100</blockquote>
101<p dir="ltr">-S [--sysinclude] option</p>
102<blockquote> 
103  <p dir="ltr">Add the given directory to the head of the list of directories
104    to be searched for system header files. If you use more than one '-S' option,
105    the directories are scanned in left-to-right order. This option is most useful
106    in the wave.cfg configuration file to specify, where the system include files
107    are to be searched.</p>
108</blockquote>
109<p dir="ltr">-F [--forceinclude] option</p>
110<blockquote> 
111  <p dir="ltr">Process the given file as normal input and include all the resulting
112    output before the processing the regular input file starts. If more than one
113    such option is given, the files are pre-included in the sequence of its occurance
114    on the command line.</p>
115</blockquote>
116<p dir="ltr">-D [--define] macro[=definition]<br>-P [--predefine] macro[=definition]</p>
117<blockquote> 
118  <p dir="ltr">This option allows to define ('-D') or predefine ('-P') a macro
119    from the command line. The string given in conjunction with the '-D' or '-P'
120    option should conform to the usual syntax MACRO(x)=definition as is described
121    in more detail <a href="class_reference_context.html#add_macro_definition">here</a>.</p>
122  <p dir="ltr"> The only difference between the '-D' and the '-P' options is,
123    that the latter predefines a macro such, that it is <b>not</b> undefinable
124    through an <tt>#undef</tt> directive from inside the preprocessed program.</p>
125</blockquote>
126<p dir="ltr">-U [--undefine] macro </p>
127<blockquote> 
128  <p dir="ltr">This allows to undefine some of the automatically predefined macros
129    of the <tt>Wave</tt> library (see <a href="predefined_macros.html">Predefined macros</a>). The only exception are
130    the <code class="keyword">__LINE__</code>, <code class="keyword">__FILE__</code>,
131    <code class="keyword">__DATE__</code>, <code class="keyword">__TIME__</code>,
132    <code class="keyword">__STDC__</code> and <code class="keyword">__cplusplus</code> 
133    predefined macros, which are not undefinable. If -U and -D are both specified
134    for one name, the name is not predefined.</p>
135</blockquote>
136<p dir="ltr">-n [--nesting] depth</p>
137<blockquote> 
138  <p dir="ltr">Specify a new maximal include nesting depth. If the preprocessing
139    reaches this include file nesting depth, it aborts the preprocessing after
140    emitting an error message. The default include file nesting depth is 1024.</p>
141</blockquote>
142<p dir="ltr">-t [--traceto] path</p>
143<blockquote> 
144  <p dir="ltr">Enable the tracing facility build into the <tt>Wave</tt> library.
145    The path specifies the filename to use for the output of the generated trace
146    log. If the filename given equals to <tt>'-'</tt> (without the quotes), the
147    trace log is put into the standard error stream (stderr).</p>
148</blockquote>
149<p dir="ltr">--timer</p>
150<blockquote>
151  <p dir="ltr">Enable to track the overall elapsed computing time required for
152    the given input file. The elapsed time is printed to stdout after the compilation
153    is completed.</p>
154</blockquote>
155<p dir="ltr">--variadics</p>
156<blockquote> 
157  <p dir="ltr">Enables support for variadics (macros with variable parameter lists),
158    placemarkers (empty macro arguments) and <tt>operator&nbsp;_Pragma</tt> in
159    normal C++ mode. This option predefines a special predefined macro <tt>__WAVE_HAS_VARIADICS__</tt>.</p>
160</blockquote>
161<p dir="ltr">--c99</p>
162<blockquote> 
163  <p dir="ltr">Enable the C99 mode. This mode enables certain C99 specific features
164    as variadics (macros with variable parameter lists), placemarkers (empty macro
165    arguments) and <tt>operator&nbsp;_Pragma</tt> support and disables some C++
166    specific token types as for instance <tt>'::'</tt>, <tt>'-&gt;*'</tt> and <tt>'-&gt;.'</tt>.
167    Several predefined macros are different for this mode, for more information
168    about predefined macros you may look <a href="predefined_macros.html">here</a>.
169  </p>
170</blockquote>
171<p dir="ltr">-l [--listincludes] path</p>
172<blockquote>
173  <p dir="ltr">Enable the output of the names of all opened include files. The path specifies the filename to use for the output of the generated include log. If the filename given equals to <tt>'-'</tt> (without the quotes), the include log is put into the standard output stream (stdout).</p>
174</blockquote>
175<p dir="ltr">-p [--preserve] </p>
176<blockquote>
177  <p dir="ltr">Preserve the comments from the input stream not located inside of macro definitions. The comments located inside macro definitions are skipped even if this option is specified. If this option is not specified on the command line all comments are skipped. </p>
178</blockquote>
179<p dir="ltr">@ [--config-file] option</p>
180<blockquote> 
181  <p dir="ltr">Some of the possible command line options may be specified inside
182    of special configuration files. This is very useful, as a shorthand for different
183    global configurations. A config file may contain additional options (-I, -S,
184    -F, -U, -D and -P options), one option per line. Empty lines and lines beginning
185    with a '#' character are ignored (are treated as a comment lines). Note that
186    the '#' character is treated as the beginning of a comment only, if it is
187    the first non-whitespace character on a line. Here is a small sample illustrating the supported configuration file syntax:</p>
188  <pre><span class="comment">    #
189    # enable variadics et.al. in C++ mode
190    #</span>
191    --variadics
192<span class="comment">    #
193    # enable timer support
194    #
195</span>    --timer
196<span class="comment">    #
197    # emulate gcc V3.3.2
198    #
199</span>    -D__GNUC__=3
200    -D__GNUC_MINOR__=3
201    -D__GNUC_PATCHLEVEL__=2
202    -D__GNUG__
203<span class="comment">    #
204    # add Boost to the system include search paths
205    #</span>
206    -S/usr/local/boost</pre> 
207  <p dir="ltr"> There is a shorthand for specifying a configuration file on the
208    command line: simply use the '@' character immediatly before the corresponding
209    file name.</p>
210  <p dir="ltr"> The options found in a configuration file are interpreted, as
211    if they were place instead of the configuration file option on the command
212    line.</p>
213</blockquote>
214<p dir="ltr">The <tt>Wave</tt> driver program looks at startup for a configuration
215  file named 'wave.cfg' in the same directory, where it was started from (where
216  is located the driver executable). If this file exists, it is treated as a normal
217  configuration file and the specified herein options are interpreted as if they
218  were given as the first options on the command line. This feature is very useful
219  for defining a global environment for the <tt>Wave</tt> preprocessor driver.</p>
220<table border="0">
221  <tr> 
222    <td width="10"></td>
223    <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
224    <td width="30"><a href="samples.html"><img src="theme/l_arr.gif" border="0"></a></td>
225    <td width="30"><a href="tracing_facility.html"><img src="theme/r_arr.gif" border="0"></a></td>
226  </tr>
227</table>
228<hr size="1">
229<p class="copyright">Copyright &copy; 2003-2005 Hartmut Kaiser<br>
230  <br>
231<font size="2">Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) </font> </p>
232<span class="updated"></span>
233<p class="copyright"><span class="updated">Last updated:
234  <!-- #BeginDate format:fcAm1m -->Sunday, May 15, 2005  12:23<!-- #EndDate -->
235</span></p>
236</body>
237</html>
Note: See TracBrowser for help on using the repository browser.