[m-dev.] for review: don't delete Mercury-generated C files unnecessarily

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 17 14:12:26 AEST 1999


Many of the lines added to configure.in in this change are > 80 columns.
I suggest indenting by 4 rather than 8 and/or using \ line continuations.

On 05-May-1999, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> configure.in:
> 	Do not blindly remove the Mercury generated C files in the compiler,
> 	library, browser and profiler directories if the results of the
> 	autoconfiguration do not match the standard source distribution's
> 	assumptions with respect to the number of tag bits and the use of
> 	unboxed floats. Instead, delete these C files only if the result
> 	of the autoconfiguration differ from the parameter settings that
> 	were used in creating those C files.
...
> +			sed -e '/END_OF_C_GRADE_INFO/,$d' < $c_file > confscratch
> +			if grep "TAG_BITS=$mercury_cv_low_tag_bits" confscratch > /dev/null 2>&1
> +			then
> +				if grep "UNBOXED_FLOAT=$mercury_cv_unboxed_floats" confscratch > /dev/null 2>&1
> +				then
> +					to_keep="$to_keep $c_file"
> +				else
> +					to_delete="$to_delete $c_file"
> +				fi
> +			else
> +				to_delete="$to_delete $c_file"
> +			fi
> +			;;
> +		esac
> +	done
> +	if test "$to_delete" = "" ; then
> +		if test "$to_keep" != "" ; then
> +			MERCURY_MSG("no - they are compatible with autoconfigured settings")
> +		else
> +			MERCURY_MSG("there are no existing Mercury-generated C files")
> +		fi
> +	else
> +		if test "$to_keep" != "" ; then
> +			MERCURY_MSG("the following C files must be rebuilt in a grade")
> +			MERCURY_MSG("that is consistent with autoconfigured settings")
> +			MERCURY_MSG("$to_delete")
> +		else
> +			MERCURY_MSG("all Mercury generated C files must be rebuilt in a grade")
> +			MERCURY_MSG("that is consistent with autoconfigured settings")
> +		fi
> +		MERCURY_MSG("installation may take longer than usual")
> +	fi
> +	rm -f confscratch $to_delete
> +fi

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list