]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(Limitations of Builtins): Clarify that
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Jan 2005 19:31:51 +0000 (19:31 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 21 Jan 2005 19:31:51 +0000 (19:31 +0000)
"if test -d foo; ..." is portable.  Suggested by Stepan Kasal.

doc/autoconf.texi

index 921d4a8e4f7cbbfd4ce1193fdb4fe3330bf3bffc..8aa2bfc2921976e2a9233c18bf8584d268d0bad9 100644 (file)
@@ -11082,8 +11082,9 @@ operators; consequently, Posix does not specify them, so using them
 is nonportable.  If you combine @samp{&&} and @samp{||} in the same
 statement, keep in mind that they have equal precedence.
 
-You may use @samp{!} with @command{test}, but not with @command{if}:
-@samp{test ! -r foo || exit 1}.
+It is safe to use @samp{!} as a @command{test} operator.  For example,
+@samp{if test ! -d foo; @dots{}} is portable even though @samp{if ! test
+-d foo; @dots{}} is not.
 
 
 @item @command{test} (files)