[m-dev.] cvs diff: bug fixes for runtests

Fergus Henderson fjh at cs.mu.oz.au
Sat Mar 15 17:49:49 AEDT 1997


Tyson Richard DOWD, you wrote:
> 
> > I suggest that you use
> > 
> > 		cflagsopt="EXTRA_CFLAGS='$2'"
> > 
> > and then use `eval', as is done for the `-c' option.
> 
> I'm not sure what you mean by this, `eval' is not used at all in
> the `handle_options' or `runtests' scripts. Do you mean - don't pass
> the variables in the arguments, but use eval to set them?

>From mercury/tests/runtests:

		# we need to use `eval' here to get the quoting right in
		# the case when $fflag or $cflag contains embedded spaces
		if eval ./runtests $jfactor $gflag $fflag $cflag

This uses eval to basically strip off one level of quotes.
Similarly, if you insert the extra quotes in the definition of
cflagsopt as shown above, you can use
	eval mmake ... $cflagsopt
rather than
	mmake ... "$cflagsopt"

-- 
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.



More information about the developers mailing list