72 lines
2.0 KiB
HTML
72 lines
2.0 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>ifdef(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>ifdef(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
ifdef - remove #ifdefs from a file
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>ifdef</STRONG> [<STRONG>-t</STRONG>] [<STRONG>-d</STRONG><EM>symbol</EM>] [<STRONG>-D</STRONG><EM>symbol</EM>] [<STRONG>-U</STRONG><EM>symbol</EM>] [<STRONG>-I</STRONG><EM>symbol</EM>] [file]
|
|
|
|
|
|
</PRE>
|
|
<H2>OPTIONS</H2><PRE>
|
|
|
|
<STRONG>-D</STRONG> Define symbol permanently
|
|
|
|
<STRONG>-I</STRONG> Ignore symbol
|
|
|
|
<STRONG>-U</STRONG> Undefine symbol permanently
|
|
|
|
<STRONG>-d</STRONG> Define symbol. It may be #undef'ed later
|
|
|
|
<STRONG>-t</STRONG> Produce a table of the symbols on <EM>stdout</EM>
|
|
|
|
|
|
</PRE>
|
|
<H2>EXAMPLES</H2><PRE>
|
|
|
|
<STRONG>ifdef</STRONG> <STRONG>-DUNIX</STRONG> <STRONG>file.c</STRONG> <STRONG>>newfile.c</STRONG>
|
|
# Define <EM>UNIX</EM>
|
|
|
|
<STRONG>ifdef</STRONG> <STRONG>-D_MINIX</STRONG> <STRONG>-UDOS</STRONG> <STRONG><x.c</STRONG> <STRONG>>y.c</STRONG>
|
|
# Define
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
|
|
<EM>Ifdef</EM> allows conditional code [ #ifdef ... #endif ] to be selectively
|
|
removed from C files, but at the same time leaving all other C
|
|
preprocessor commands intact such as #define, #include etc. Input to
|
|
<EM>ifdef</EM> is either the file named as the last argument, or <EM>stdin</EM> if no file
|
|
is named. Output goes to <EM>stdout</EM>.
|
|
|
|
Symbols may be defined with the <STRONG>-d</STRONG> or <STRONG>-D</STRONG> flags just like <EM>cpp</EM>, except that
|
|
the latter option ignores subsequent #<EM>undefs</EM>. It is not permitted to
|
|
give values to symbols. Similarly, <STRONG>-U</STRONG> undefines a symbol and ignores
|
|
subsequent #<EM>defines</EM>s. Symbols defined with <STRONG>-I</STRONG> are ignored; any #<EM>ifdef</EM>
|
|
using an ignored symbol will be left intact.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|