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 03:14:06 +0000

Hi Ralf,
> > 
> > I just noticed that AS_MKDIR_P already does AS_ERROR (fatal to the script)
> > if it fails,
> 
> Which sucks, frankly.  Another badly designed interface that now is less
> generally usable than it could be.  And we have to stick to it because
> 2.59 has it, too.  Wish we had chosen a worse name..

Here's where an interface change might work.  Would this proposal
be acceptable:

# AS_MKDIR_P(dir, [allow-fail])
#--------------
# Ensure that DIR exists, possibly as a symlink, and create
# it and all intermediate directories if necessary.  On failure,
# return the status if the optional ALLOW-FAIL is not blank;
# otherwise issue an error message and terminate the shell.

Or even something like:
# AS_MKDIR_P(dir, [action-if-fail = AS_ERROR])
#-----------
# Ensure that DIR exists, possibly as a symlink, and create
# it and all intermediate directories if necessary.  On failure,
# invoke ACTION-IF-FAIL, which defaults to printing an
# error message and terminating the shell if not specified.

Either way, it should be easy to change the m4 implementation
to add the optional $2 argument which would let code avoid
the AS_ERROR in AS_MKDIR_P.

-- 
Eric Blake




reply via email to

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