diff: fix another couple of bindist bugs

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Nov 29 14:45:42 AEDT 1998


Estimated hours taken: 0.5

Fix another couple of bugs in the binary distribution.

bindist/bindist.Makefile.in:
	- Make sure to install the `mdb' and `mmake' lib subdirectories.
	- Ensure that installation doesn't fail in the case where
	  the binary distribution was built without SICStus or NU-Prolog
	  but is installed on a machine which does have either of those
	  installed.

Index: bindist/bindist.Makefile.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 bindist.Makefile.in
--- bindist.Makefile.in	1998/11/24 00:26:10	1.12
+++ bindist.Makefile.in	1998/11/29 03:41:27
@@ -28,8 +28,9 @@
 
 INSTALL_MMAKE_EXTRAS	= scripts/Mmake.rules scripts/Mmake.vars
 
-LIB_PARTS		= bin doc html inc ints lib modules \
-			@NUPROLOG@ @SICSTUS@
+LIB_PARTS		= bin doc html inc ints lib mdb mmake modules
+LIB_NUPROLOG_PARTS	= @NUPROLOG@
+LIB_SICSTUS_PARTS	= @SICSTUS@
 
 UTILS			= util/mdemangle util/mkinit util/mtags
 
@@ -59,8 +60,15 @@
 	# (XXX don't use redirection or pipes, because on gnu-win32
 	# stdout defaults to text mode, which breaks tar and gzip)
 	gzip --decompress lib.tar.gz
-	LIB_TAR_FILE=`pwd`/lib.tar && cd $(INSTALL_LIBDIR) && \
-		tar -xf $$LIB_TAR_FILE $(LIB_PARTS)
+	# if the binary distribution doesn't include NU-Prolog or
+	# SICStus Prolog support, then attempting to extract them
+	# from the tar file will fail; we therefore ignore any errors
+	# in those two steps.
+	LIB_TAR_FILE=`pwd`/lib.tar && cd $(INSTALL_LIBDIR) && {		\
+		tar -xf $$LIB_TAR_FILE $(LIB_NUPROLOG_PARTS);		\
+		tar -xf $$LIB_TAR_FILE $(LIB_SICSTUS_PARTS);		\
+		tar -xf $$LIB_TAR_FILE $(LIB_PARTS);			\
+	}
 	gzip lib.tar # tidy up
 	@echo "-- Done."
 

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