diff: tools/test_mercury: binary dist fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 13 19:03:53 AEDT 1998


tools/test_mercury:
	Fix a bug in the code for automatically building binary distributions
	(it was accessing `$version', which had not yet been defined.)
	Also change it to build "unstable" binary distributions, in the
	case where some of the tests failed, as well as "stable" ones.

Mmakefile:
	Add a new target `fullarch' which just echos $FULLARCH,
	for use by tools/test_mercury.

Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.28
diff -u -r1.28 Mmakefile
--- Mmakefile	1998/11/06 11:09:32	1.28
+++ Mmakefile	1998/11/12 04:43:52
@@ -257,6 +257,10 @@
 version:
 	@echo $(VERSION)
 
+.PHONY: fullarch
+fullarch:
+	@echo $(FULLARCH)
+
 #-----------------------------------------------------------------------------#
 
 .PHONY: install
Index: tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.83
diff -u -r1.83 test_mercury
--- test_mercury	1998/11/11 02:27:35	1.83
+++ test_mercury	1998/11/13 08:00:54
@@ -69,6 +69,12 @@
 DIR=$TESTDIR/test_dirs/$HOST
 INSTALL_DIR=/home/mercury/public/mercury-latest/$FULLARCH
 
+BETA_FTPDIR=/home/tsa/ftp/pub/mercury/beta-releases
+BETA_WEBDIR=/local/dept/w3/unsupported/docs/mercury/download/files/beta-releases
+
+STABLE=$DIR/mercury-latest-stable
+UNSTABLE=$DIR/mercury-latest-unstable
+
 case $ARCH in
 	alpha)
 		# due to a bug in the DEC loader, INSTALL_DIR should be
@@ -449,9 +455,6 @@
 
 : update the unstable release
 
-BETA_FTPDIR=/home/tsa/ftp/pub/mercury/beta-releases
-BETA_WEBDIR=/local/dept/w3/unsupported/docs/mercury/download/files/beta-releases
-
 case $HOST in murlibobo)
 	rm -f $BETA_FTPDIR/mercury-*-rotd-*-unstable.tar.gz &&
 	cp mercury-latest-unstable/mercury-*-$version-unstable.tar.gz \
@@ -464,19 +467,25 @@
 
 #-----------------------------------------------------------------------------#
 
-STABLE=mercury-latest-stable
-UNSTABLE=mercury-latest-unstable
-
 : build the binary distribution
 
+{
+	cd $DIR/mercury &&
+	version=`mmake version` &&
+	fullarch=`mmake fullarch` &&
+	mmake bindist &&
+	cd .. &&
+	( [ -d $UNSTABLE ] || mkdir $UNSTABLE ) &&
+	rm -f $UNSTABLE/mercury-*.$fullarch.tar.gz &&
+	mv mercury/mercury-$version.$fullarch.tar.gz $STABLE
+} || status=1
+
 case $status in
     0) {
-    	cd $DIR/mercury &&
-    	mmake bindist &&
-	cd .. &&
+    	cd $DIR &&
 	( [ -d $STABLE ] || mkdir $STABLE ) &&
-	rm -f $STABLE/* &&
-	mv mercury/mercury-$version.*.tar.gz $STABLE
+	rm -f $STABLE/mercury-*.$fullarch.tar.gz &&
+	cp $UNSTABLE/mercury-$version.$fullarch.tar.gz $STABLE
        } || status=1
     ;;
 esac

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list