autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autotest fails when pwd is testgroup directory


From: Eric Blake
Subject: Re: autotest fails when pwd is testgroup directory
Date: Thu, 06 Apr 2006 21:57:06 -0600
User-agent: Thunderbird 1.5 (Windows/20051201)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Noah Misch on 4/5/2006 8:10 AM:
> 
>> Also, should we document AS_ERROR and friends in autoconf.texi?
> 
> I don't have an opinion on this.

Ralf mentioned AC_MSG_ERROR, but that has different semantics (exit
autoconf, not configure).  So, (in a separate patch), here is a first cut
at documenting another portion of m4sh.

> 
>> Also, AS_MKDIR_P is not threadsafe if mkdir -p is not supported, is that a
>> problem?
> 
> This does not matter for Autoconf.

I improved my documentation attempt to try to capture this idea.

> 
> 
>> 2006-04-05  Eric Blake  <address@hidden>
>>
>>      * doc/autoconf.texi (Programming in M4sh): Document that
>>      AS_MKDIR_P exits the script on failure.
> 
> This part is fine.

Resubmitted.

> 
>>      * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE, AS_MESSAGE, AS_WARN)
>>      (AS_ERROR, AS_MKDIR_P, _AS_DIRNAME_PREPARE, _AS_MKDIR_P_PREPARE)
>>      (_AS_TR_*PREPARE): Improve documentation.
> 
> These changes don't clarify much.

Is it worth resending that as a separate patch, so that all functions in
m4sh.m4 are consistently documented?  For now, I am not resubmitting
without further consensus.

> 
> You took a very simple change and expanded its diff by a factor of nine 
> through
> unrelated comment updates and white space cleanups.  Please avoid that.

Sorry about that.

2006-04-06  Eric Blake  <address@hidden>

        * doc/autoconf.texi (Programming in M4sh): Document that
        AS_MKDIR_P exits the script on failure.
        * lib/autotest/general.m4: Remove redundant AS_ERROR.

2006-04-06  Eric Blake  <address@hidden>

        * doc/autoconf.text (Programming in M4sh): Slightly weaken the
        disclaimer about using m4sh.  Document AS_ERROR, AS_MESSAGE, and
        AS_WARN.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFENeMR84KuGfSFAYARAoV4AKDDi9VU9Q1zijsuZlruaO8EMFSLhQCeOi8W
E/Al+L9ZSaHUyJBhDNPyWxk=
=NbmD
-----END PGP SIGNATURE-----
Index: doc/autoconf.texi
===================================================================
RCS file: /sources/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.986
diff -u -p -r1.986 autoconf.texi
--- doc/autoconf.texi   6 Apr 2006 17:51:22 -0000       1.986
+++ doc/autoconf.texi   7 Apr 2006 03:31:46 -0000
@@ -9462,6 +9462,15 @@ lack support for the @option{-p} option.
 succeeds if @var{file-name} is a symbolic link to an existing directory,
 even though Posix is unclear whether @samp{mkdir -p} should
 succeed in that case.
+
+This version is not necessarily thread-safe; see @pxref{Limitations of
+Usual Tools} for more details.  However, since @code{configure} is not
+generally run in parallel with other processes trying to create the same
+directory tree, this is normally not a problem.  If creation of
address@hidden fails, this macro prints an error message and exits the
+script.
address@hidden FIXME The AS_MKDIR_P interface should be enhanced post 2.60 to 
allow
address@hidden the user to handle failure themselves, rather than always 
exiting.
 @end defmac
 
 @defmac AS_SHELL_SANITIZE
Index: lib/autotest/general.m4
===================================================================
RCS file: /sources/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.204
diff -u -p -b -r1.204 general.m4
--- lib/autotest/general.m4     5 Apr 2006 20:55:14 -0000       1.204
+++ lib/autotest/general.m4     7 Apr 2006 03:31:48 -0000
@@ -702,8 +702,7 @@ do
        rm -fr $at_group_dir
       fi
       # Be tolerant if the above `rm' was not able to remove the directory.
-      AS_MKDIR_P([$at_group_dir]) ||
-       AS_ERROR([cannot create $at_group_dir])
+      AS_MKDIR_P([$at_group_dir])
       cd $at_group_dir
       ;;
   esac
Index: doc/autoconf.texi
===================================================================
RCS file: /sources/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.986
diff -u -p -r1.986 autoconf.texi
--- doc/autoconf.texi   6 Apr 2006 17:51:22 -0000       1.986
+++ doc/autoconf.texi   7 Apr 2006 03:53:28 -0000
@@ -9400,10 +9400,10 @@ A mess; trouble.  [Obs.] --Beau.@: & Fl.
 @end quotation
 
 
-For the time being, it is not mature enough to be widely used.
-
 M4sh provides portable alternatives for some common shell constructs
-that unfortunately are not portable in practice.
+that unfortunately are not portable in practice.  Some of these
+interfaces are still under development, and may change in future
+releases, but those documented here will continue to be supported.
 
 @defmac AS_BASENAME (@var{file-name})
 @asindex{BASENAME}
@@ -9434,6 +9434,14 @@ if @code{$file} is @samp{/one/two/three}
 @code{dir=`AS_DIRNAME(["$file"])`} sets @code{dir} to @samp{/one/two}.
 @end defmac
 
address@hidden AS_ERROR (@var{error}, @dvar{exit-status, @samp{1}})
address@hidden
+Issue the error message @var{error} to stderr, prefixed with the name of
+the script and the string @samp{error: }, then exit the script in such a
+way that trap 0 will see @var{$?} set to @var{exit-status}.  Also log
+the message if @code{AS_MESSAGE_LOG_FD} is defined.
address@hidden defmac
+
 @defmac AS_IF (@var{test1}, @ovar{run-if-true1}, @dots{}, @ovar{run-if-false})
 @asindex{IF}
 Run shell code @var{test1}.  If @var{test1} exits with a zero status then
@@ -9453,6 +9461,16 @@ will make sure any @code{AC_REQUIRE}'s m
 be expanded before the first test.
 @end defmac
 
address@hidden AS_MESSAGE (@var{string}, @var{fd})
address@hidden
address@hidden Technically, fd defaults to the definition of AS_MESSAGE_FD, but
address@hidden this macro must be defined by the user.  For now, just list fd 
as a
address@hidden required argument.
+Output @var{string} to the open file descriptor number @var{fd},
+prefixed with the name of the script.  Also log the message if
address@hidden is defined.
address@hidden defmac
+
 @defmac AS_MKDIR_P (@var{file-name})
 @asindex{MKDIR_P}
 Make the directory @var{file-name}, including intervening directories
@@ -9504,6 +9531,13 @@ optimizing the common cases (@var{dir} o
 @var{file} is absolute, etc.).
 @end defmac
 
address@hidden AS_WARN (@var{problem})
address@hidden
+Issue the warning message @var{problem} to stderr, prefixed with the
+name of the script and the string @samp{WARNING: }.  Also log the
+message if @code{AS_MESSAGE_LOG_FD} is defined.
address@hidden defmac
+
 
 @node File Descriptor Macros
 @section File Descriptor Macros

reply via email to

[Prev in Thread] Current Thread [Next in Thread]