summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-23 03:00:26 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-23 03:00:26 +0000
commitd025212513cdf87cd36f9f7b6e480f40c1771721 (patch)
treef00ae1012fd971df327606520d5c8cccaa408a2c /gcc/doc
parentebd8f17f854b689d999691710cdc955795d84243 (diff)
downloadgcc-d025212513cdf87cd36f9f7b6e480f40c1771721.tar.gz
* doc/invoke.texi (Spec Files): Document getenv spec function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a6bcd721cf3..ccd6a54dd92 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7415,6 +7415,19 @@ of the current spec.
The following built-in spec functions are provided:
@table @code
+@item @code{getenv}
+The @code{getenv} spec function takes two arguments: an environment
+variable name and a string. If the environment variable is not
+defined, a fatal error is issued. Otherwise, the return value is the
+value of the environment variable concatenated with the string. For
+example, if @env{TOPDIR} is defined as @file{/path/to/top}, then:
+
+@smallexample
+%:getenv(TOPDIR /include)
+@end smallexample
+
+expands to @file{/path/to/top/include}.
+
@item @code{if-exists}
The @code{if-exists} spec function takes one argument, an absolute
pathname to a file. If the file exists, @code{if-exists} returns the