[m-dev.] diff: mmake: if [ -d Mercury ] then enable --use-subdirs

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri May 29 12:30:30 AEST 1998


> -use_subdirs=${MMAKE_USE_SUBDIRS=no}
> +use_subdirs=${MMAKE_USE_SUBDIRS=`
> +	if [ -d Mercury ]; then echo yes; else echo no; fi`}

This is an inefficient way of doing this. The more straightforward

if test -d Mercury
then
	use_subdirs=${MMAKE_USE_SUBDIRS=yes}
else
	use_subdirs=${MMAKE_USE_SUBDIRS=no}
fi

ought to be faster, since if test is builtin it does not create a new process.

Zoltan.



More information about the developers mailing list