summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2004-11-30 19:51:24 +0000
committerBoris Kolpackov <boris@kolpackov.net>2004-11-30 19:51:24 +0000
commit49ca261bd5a40d933719ab6b2b1fd183a81bf35b (patch)
tree091a838b31da80405fcd882aab7d8a387e4c5bd1 /doc
parentbe6a8bc869ece930f3bd5f725efd9fab7a2c2940 (diff)
downloadgunmake-49ca261bd5a40d933719ab6b2b1fd183a81bf35b.tar.gz
Implemented `realpath' and `abspath' built-in functions.
Diffstat (limited to 'doc')
-rw-r--r--doc/make.texi32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/make.texi b/doc/make.texi
index 14d7278..e814ec2 100644
--- a/doc/make.texi
+++ b/doc/make.texi
@@ -6188,6 +6188,27 @@ wildcard characters (as in shell file name patterns). The result of
@code{wildcard} is a space-separated list of the names of existing files
that match the pattern.
@xref{Wildcards, ,Using Wildcard Characters in File Names}.
+
+@item $(realpath @var{names}@dots{})
+@findex realpath
+@cindex realpath
+@cindex file name, realpath of
+For each file name in @var{names} return the canonical absolute name.
+A canonical name does not contain any @code{.} or @code{..} components,
+nor any repeated path separators (@code{/}) or symlinks. In case of a
+failure the empty string is returned. Consult the @code{realpath(3)}
+documentation for a list of possible failure causes.
+
+@item $(abspath @var{names}@dots{})
+@findex abspath
+@cindex abspath
+@cindex file name, abspath of
+For each file name in @var{names} return an absolute name that does
+not contain any @code{.} or @code{..} components, nor any repeated path
+separators (@code{/}). Note that in contrast to @code{realpath}
+function, @code{abspath} does not resolve symlinks and does not require
+the file names to refer to an existing file or directory. Use the
+@code{wildcard} function to test for existence.
@end table
@node Foreach Function, If Function, File Name Functions, Functions
@@ -9756,6 +9777,17 @@ Find file names matching a shell file name pattern (@emph{not} a
@samp{%} pattern).@*
@xref{Wildcard Function, ,The Function @code{wildcard}}.
+@item $(realpath @var{names}@dots{})
+For each file name in @var{names}, expand to an absolute name that
+does not contain any @code{.}, @code{..}, nor symlinks.@*
+@xref{File Name Functions, ,Functions for File Names}.
+
+@item $(abspath @var{names}@dots{})
+For each file name in @var{names}, expand to an absolute name that
+does not contain any @code{.} or @code{..} components, but preserves
+symlinks.@*
+@xref{File Name Functions, ,Functions for File Names}.
+
@item $(error @var{text}@dots{})
When this function is evaluated, @code{make} generates a fatal error