From 49ca261bd5a40d933719ab6b2b1fd183a81bf35b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 Nov 2004 19:51:24 +0000 Subject: Implemented `realpath' and `abspath' built-in functions. --- doc/make.texi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc') 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 -- cgit v1.2.3