cppenv.texi 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. @c Copyright (C) 1999-2015 Free Software Foundation, Inc.
  2. @c This is part of the CPP and GCC manuals.
  3. @c For copying conditions, see the file gcc.texi.
  4. @c ---------------------------------------------------------------------
  5. @c Environment variables affecting the preprocessor
  6. @c ---------------------------------------------------------------------
  7. @c If this file is included with the flag ``cppmanual'' set, it is
  8. @c formatted for inclusion in the CPP manual; otherwise the main GCC manual.
  9. @vtable @env
  10. @item CPATH
  11. @itemx C_INCLUDE_PATH
  12. @itemx CPLUS_INCLUDE_PATH
  13. @itemx OBJC_INCLUDE_PATH
  14. @c Commented out until ObjC++ is part of GCC:
  15. @c @itemx OBJCPLUS_INCLUDE_PATH
  16. Each variable's value is a list of directories separated by a special
  17. character, much like @env{PATH}, in which to look for header files.
  18. The special character, @code{PATH_SEPARATOR}, is target-dependent and
  19. determined at GCC build time. For Microsoft Windows-based targets it is a
  20. semicolon, and for almost all other targets it is a colon.
  21. @env{CPATH} specifies a list of directories to be searched as if
  22. specified with @option{-I}, but after any paths given with @option{-I}
  23. options on the command line. This environment variable is used
  24. regardless of which language is being preprocessed.
  25. The remaining environment variables apply only when preprocessing the
  26. particular language indicated. Each specifies a list of directories
  27. to be searched as if specified with @option{-isystem}, but after any
  28. paths given with @option{-isystem} options on the command line.
  29. In all these variables, an empty element instructs the compiler to
  30. search its current working directory. Empty elements can appear at the
  31. beginning or end of a path. For instance, if the value of
  32. @env{CPATH} is @code{:/special/include}, that has the same
  33. effect as @samp{@w{-I. -I/special/include}}.
  34. @c man end
  35. @ifset cppmanual
  36. See also @ref{Search Path}.
  37. @end ifset
  38. @c man begin ENVIRONMENT
  39. @item DEPENDENCIES_OUTPUT
  40. @cindex dependencies for make as output
  41. If this variable is set, its value specifies how to output
  42. dependencies for Make based on the non-system header files processed
  43. by the compiler. System header files are ignored in the dependency
  44. output.
  45. The value of @env{DEPENDENCIES_OUTPUT} can be just a file name, in
  46. which case the Make rules are written to that file, guessing the target
  47. name from the source file name. Or the value can have the form
  48. @samp{@var{file} @var{target}}, in which case the rules are written to
  49. file @var{file} using @var{target} as the target name.
  50. In other words, this environment variable is equivalent to combining
  51. the options @option{-MM} and @option{-MF}
  52. @ifset cppmanual
  53. (@pxref{Invocation}),
  54. @end ifset
  55. @ifclear cppmanual
  56. (@pxref{Preprocessor Options}),
  57. @end ifclear
  58. with an optional @option{-MT} switch too.
  59. @item SUNPRO_DEPENDENCIES
  60. @cindex dependencies for make as output
  61. This variable is the same as @env{DEPENDENCIES_OUTPUT} (see above),
  62. except that system header files are not ignored, so it implies
  63. @option{-M} rather than @option{-MM}. However, the dependence on the
  64. main input file is omitted.
  65. @ifset cppmanual
  66. @xref{Invocation}.
  67. @end ifset
  68. @ifclear cppmanual
  69. @xref{Preprocessor Options}.
  70. @end ifclear
  71. @end vtable