[m-rev.] for review: configure.in improvements

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 8 02:54:32 AEDT 2002


On 08-Nov-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 07-Nov-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 06-Nov-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > > 
> > > configure.in:
> > ...
> > > +case $remake_dependencies in true)
> > > +	mmake depend ;;
> > > +esac
> > 
> > If `mmake depend' fails, then configure should return a non-zero exit
> > status.
> > 
> > Also, it might be nice to output a message or two explaining what was
> > happening here.
> 
> diff -u configure.in configure.in
> --- configure.in
> +++ configure.in
> @@ -3193,6 +3193,13 @@
>  )
>  
>  case $remake_dependencies in true)
> -	mmake depend ;;
> +	MERCURY_MSG("regenerating dependencies to enable GCC backend")
> +	MERCURY_MSG("and/or disable Aditi backend.")
> +
> +	mmake depend >&AC_FD_CC 2>&1
> +	if test $? != 0; then
> +		exit $?
> +	fi
> +	;;

If `mmake depend' fails, then configure should return a non-zero exit
status.  The code above will still exit with status zero, because the
second $?  refers to the exit status of "test".

Also, if the messages from mmake depend are being redirected to config.log,
as happens in the new code above, then if mmake depend fails we need to
output a message, preferably one that mentions the "config.log" file.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list