• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/cpp/
1<html lang="en">
2<head>
3<title>Environment Variables - The C Preprocessor</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="The C Preprocessor">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="prev" href="Invocation.html#Invocation" title="Invocation">
9<link rel="next" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" title="GNU Free Documentation License">
10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11<!--
12Copyright (C) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
131997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
142008, 2009, 2010, 2011
15Free Software Foundation, Inc.
16
17Permission is granted to copy, distribute and/or modify this document
18under the terms of the GNU Free Documentation License, Version 1.3 or
19any later version published by the Free Software Foundation.  A copy of
20the license is included in the
21section entitled ``GNU Free Documentation License''.
22
23This manual contains no Invariant Sections.  The Front-Cover Texts are
24(a) (see below), and the Back-Cover Texts are (b) (see below).
25
26(a) The FSF's Front-Cover Text is:
27
28     A GNU Manual
29
30(b) The FSF's Back-Cover Text is:
31
32     You have freedom to copy and modify this GNU Manual, like GNU
33     software.  Copies published by the Free Software Foundation raise
34     funds for GNU development.
35-->
36<meta http-equiv="Content-Style-Type" content="text/css">
37<style type="text/css"><!--
38  pre.display { font-family:inherit }
39  pre.format  { font-family:inherit }
40  pre.smalldisplay { font-family:inherit; font-size:smaller }
41  pre.smallformat  { font-family:inherit; font-size:smaller }
42  pre.smallexample { font-size:smaller }
43  pre.smalllisp    { font-size:smaller }
44  span.sc    { font-variant:small-caps }
45  span.roman { font-family:serif; font-weight:normal; } 
46  span.sansserif { font-family:sans-serif; font-weight:normal; } 
47--></style>
48<link rel="stylesheet" type="text/css" href="../cs.css">
49</head>
50<body>
51<div class="node">
52<a name="Environment-Variables"></a>
53<p>
54Next:&nbsp;<a rel="next" accesskey="n" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
55Previous:&nbsp;<a rel="previous" accesskey="p" href="Invocation.html#Invocation">Invocation</a>,
56Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
57<hr>
58</div>
59
60<h2 class="chapter">13 Environment Variables</h2>
61
62<p><a name="index-environment-variables-198"></a><!-- man begin ENVIRONMENT -->
63
64   <p>This section describes the environment variables that affect how CPP
65operates.  You can use them to specify directories or prefixes to use
66when searching for include files, or to control dependency output.
67
68   <p>Note that you can also specify places to search using options such as
69<samp><span class="option">-I</span></samp>, and control dependency output with options like
70<samp><span class="option">-M</span></samp> (see <a href="Invocation.html#Invocation">Invocation</a>).  These take precedence over
71environment variables, which in turn take precedence over the
72configuration of GCC.
73
74<!-- Copyright (c) 1999, 2000, 2001, 2002, 2004 -->
75<!-- Free Software Foundation, Inc. -->
76<!-- This is part of the CPP and GCC manuals. -->
77<!-- For copying conditions, see the file gcc.texi. -->
78<!--  -->
79<!-- Environment variables affecting the preprocessor -->
80<!--  -->
81<!-- If this file is included with the flag ``cppmanual'' set, it is -->
82<!-- formatted for inclusion in the CPP manual; otherwise the main GCC manual. -->
83     <dl>
84<dt><samp><span class="env">CPATH</span></samp><a name="index-CPATH-199"></a><dt><samp><span class="env">C_INCLUDE_PATH</span></samp><a name="index-C_005fINCLUDE_005fPATH-200"></a><dt><samp><span class="env">CPLUS_INCLUDE_PATH</span></samp><a name="index-CPLUS_005fINCLUDE_005fPATH-201"></a><dt><samp><span class="env">OBJC_INCLUDE_PATH</span></samp><a name="index-OBJC_005fINCLUDE_005fPATH-202"></a><dd><!-- Commented out until ObjC++ is part of GCC: -->
85<!-- @itemx OBJCPLUS_INCLUDE_PATH -->
86Each variable's value is a list of directories separated by a special
87character, much like <samp><span class="env">PATH</span></samp>, in which to look for header files. 
88The special character, <code>PATH_SEPARATOR</code>, is target-dependent and
89determined at GCC build time.  For Microsoft Windows-based targets it is a
90semicolon, and for almost all other targets it is a colon.
91
92     <p><samp><span class="env">CPATH</span></samp> specifies a list of directories to be searched as if
93specified with <samp><span class="option">-I</span></samp>, but after any paths given with <samp><span class="option">-I</span></samp>
94options on the command line.  This environment variable is used
95regardless of which language is being preprocessed.
96
97     <p>The remaining environment variables apply only when preprocessing the
98particular language indicated.  Each specifies a list of directories
99to be searched as if specified with <samp><span class="option">-isystem</span></samp>, but after any
100paths given with <samp><span class="option">-isystem</span></samp> options on the command line.
101
102     <p>In all these variables, an empty element instructs the compiler to
103search its current working directory.  Empty elements can appear at the
104beginning or end of a path.  For instance, if the value of
105<samp><span class="env">CPATH</span></samp> is <code>:/special/include</code>, that has the same
106effect as &lsquo;<samp><span class="samp">-I.&nbsp;-I/special/include<!-- /@w --></span></samp>&rsquo;.
107
108     <!-- man end -->
109     <p>See also <a href="Search-Path.html#Search-Path">Search Path</a>. 
110<!-- man begin ENVIRONMENT -->
111
112     <br><dt><samp><span class="env">DEPENDENCIES_OUTPUT</span></samp><a name="index-DEPENDENCIES_005fOUTPUT-203"></a><dd><a name="index-dependencies-for-make-as-output-204"></a>If this variable is set, its value specifies how to output
113dependencies for Make based on the non-system header files processed
114by the compiler.  System header files are ignored in the dependency
115output.
116
117     <p>The value of <samp><span class="env">DEPENDENCIES_OUTPUT</span></samp> can be just a file name, in
118which case the Make rules are written to that file, guessing the target
119name from the source file name.  Or the value can have the form
120&lsquo;<samp><var>file</var> <var>target</var></samp>&rsquo;, in which case the rules are written to
121file <var>file</var> using <var>target</var> as the target name.
122
123     <p>In other words, this environment variable is equivalent to combining
124the options <samp><span class="option">-MM</span></samp> and <samp><span class="option">-MF</span></samp>
125(see <a href="Invocation.html#Invocation">Invocation</a>),
126with an optional <samp><span class="option">-MT</span></samp> switch too.
127
128     <br><dt><samp><span class="env">SUNPRO_DEPENDENCIES</span></samp><a name="index-SUNPRO_005fDEPENDENCIES-205"></a><dd><a name="index-dependencies-for-make-as-output-206"></a>This variable is the same as <samp><span class="env">DEPENDENCIES_OUTPUT</span></samp> (see above),
129except that system header files are not ignored, so it implies
130<samp><span class="option">-M</span></samp> rather than <samp><span class="option">-MM</span></samp>.  However, the dependence on the
131main input file is omitted. 
132See <a href="Invocation.html#Invocation">Invocation</a>. 
133</dl>
134   <!-- man end -->
135
136<!-- Special handling for inclusion in the install manual. -->
137<!-- man begin DESCRIPTION -->
138   </body></html>
139
140