[m-dev.] For review: remove dir name assumption from `mmake tar'

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 10 20:29:02 AEDT 1999


On 10-Mar-1999, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Mmakefile:
> 	Removed the assumption from the target `tar' that the root
> 	source directory is named "mercury".
...
> +       export ROOTNAME=`basename $$(pwd)`;                             \

That is a bash-ism.  Two bash-isms, actually.
You should use

	VAR=value
	export VAR

rather than

	export VAR=value

and you should use

	var=`pwd`

rather than 

	var=$(pwd)

Also you should put it all inside double quotes, in
case the directory name contains spaces (e.g. "/Program Files/Mercury").

So replace that with

       DIRNAME="`pwd`";                             			\
       ROOTNAME="`basename $$DIRNAME`";                             	\
       export ROOTNAME;							\

Apart from that it looks OK.

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