[m-rev.] diff: use pipes rather than old gnu-win32 bug work-around

Fergus Henderson fjh at cs.mu.OZ.AU
Wed May 30 16:04:34 AEST 2001


This change is not yet tested much.  However, the easiest way to 
test it properly is to commit it and then try out the resulting
rotd binary distributions produced by our nightly tests.

----------

Estimated hours taken: 0.25
Branches: main

bindist/bindist.Makefile.in:
	Use pipes rather than doing gunzip and tar -x in separate steps.
	This is faster and requires significantly less disk space.
	The gnu-win32/Cygwin bug that the previous code was working
	around has been fixed since at least Cygwin 1.1.*.

Workspace: /mnt/mars/home/mars/fjh/ws1/mercury
Index: bindist/bindist.Makefile.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.Makefile.in,v
retrieving revision 1.24
diff -u -d -r1.24 bindist.Makefile.in
--- bindist/bindist.Makefile.in	1999/12/24 04:25:00	1.24
+++ bindist/bindist.Makefile.in	2001/05/30 05:55:51
@@ -66,24 +66,16 @@
 install_lib:
 	@echo "-- Installing lib in $(INSTALL_LIBDIR)..."
 	test -d $(INSTALL_LIBDIR) || mkdir -p $(INSTALL_LIBDIR)
-	# (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)
-	gzip lib.tar # tidy up
+	gzip --decompress --stdout lib.tar.gz | ( \
+		cd $(INSTALL_LIBDIR) && tar -xf - $(LIB_PARTS) )
 	@echo "-- Done."
 
 .PHONY: install_info
 install_info:
 	@echo "-- Installing info documentation in $(INSTALL_INFODIR)..."
 	test -d $(INSTALL_INFODIR) || mkdir -p $(INSTALL_INFODIR)
-	# (XXX don't use redirection or pipes, because on gnu-win32
-	# stdout defaults to text mode, which breaks tar and gzip)
-	gzip --decompress info.tar.gz
-	INFO_TAR_FILE=`pwd`/info.tar &&  cd $(INSTALL_INFODIR)/.. && \
-		tar -xf $$INFO_TAR_FILE
-	gzip info.tar # tidy up
+	gzip --decompress --stdout info.tar.gz | ( \
+		cd $(INSTALL_INFODIR)/.. && tar -xf - )
 	@echo "-- Done."
 
 .PHONY: install_man
@@ -92,10 +84,8 @@
 	test -d $(INSTALL_MAN_DIR) || mkdir -p $(INSTALL_MAN_DIR)
 	# (XXX don't use redirection or pipes, because on gnu-win32
 	# stdout defaults to text mode, which breaks tar and gzip)
-	gzip --decompress man.tar.gz
-	MAN_TAR_FILE=`pwd`/man.tar &&  cd $(INSTALL_MAN_DIR)/.. && \
-		tar -xf $$MAN_TAR_FILE
-	gzip man.tar # tidy up
+	gzip --decompress --stdout man.tar.gz | ( \
+		cd $(INSTALL_MAN_DIR)/.. && tar -xf - )
 	@echo "-- Done."
 
 .PHONY: install_scripts

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list