[m-dev.] diff: test_mercury: build gcc back-end on hg

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Feb 17 18:40:26 AEDT 2001


Estimated hours taken: 0.5

tools/test_mercury:
	On hg, checkout and build the gcc sources, so that the gcc
	back-end interface is enabled.

Workspace: /home/mercury/public/test_mercury/scripts/mercury
Index: tools/test_mercury
===================================================================
RCS file: /home/staff/zs/imp/mercury/tools/test_mercury,v
retrieving revision 1.137
diff -u -d -r1.137 test_mercury
--- tools/test_mercury	2001/02/10 13:32:30	1.137
+++ tools/test_mercury	2001/02/17 07:37:19
@@ -330,6 +330,54 @@
 rm -f mercury/extras/dynamic_linking/dl.m
 cvs checkout $CHECKOUT_OPTS mercury tests || { false; exit 1; }
 case $HOST in
+	hg)
+		# Check out the Mercury gcc back-end interface sources
+		[ -d mercury-cvs ] || mkdir mercury-cvs
+		(cd mercury-cvs && cvs checkout $CHECKOUT_OPTS gcc/mercury) ||
+			{ false; exit 1; }
+		# Check out the main gcc sources.
+		# See <http://gcc.gnu.org/cvs.html>.
+		#
+		# Once the gcc sources have been checked out here,
+		# the Mercury autoconfiguration script should find them
+		# automatically, so we don't need to bother explicitly
+		# passing `--enable-gcc-back-end' to configure.
+		#
+		# Note that the `cvs login' command, namely
+		# `cvs -d :pserver:anoncvs at gcc.gnu.org:/cvs/gcc login'
+		# must be done manually, since there is no easy way to pass
+		# the password (`anoncvs') from a script.
+		# Once it is done once, it will be saved in the user's
+		# ~/.cvspass file, so it doesn't need to be done again.
+		#
+		# XXX This is commented out for now, to save bandwidth,
+		#     since currently we're using a fixed snapshot
+		#     (`-r gcc_ss_20010129') anyway.
+		#     Eventually this should change to use
+		#     `-r gcc_latest_snapshot'.
+		###date
+		###cvs -d :pserver:anoncvs at gcc.gnu.org:/cvs/gcc -z 9 \
+		###	checkout -r gcc_ss_20010129 gcc || { false; exit 1; }
+		date
+		# Link the Mercury gcc back-end interface sources
+		# into the appropriate place in the gcc sources
+		(cd gcc/gcc && rm -f mercury && \
+			ln -s ../../mercury-cvs/gcc/mercury mercury) \
+			|| { false; exit 1; }
+		# Now configure and build the gcc directory.
+		# The gcc cvs repository includes some automatically
+		# generated files; we need to touch them here before
+		# running configure.
+		# XXX We should perhaps also do `make distclean' before
+		# configure.
+		(cd gcc && 
+			contrib/gcc_update --touch &&
+			sh configure --enable-languages=mercury &&
+			make) || status=1
+		date
+		;;
+esac
+case $HOST in
 	murlibobo|kryten|taifun|quicksilver|hg|hydra|roy|venus)
 		[ -d mercury/extras/clpr/CVS ] ||
 		(cd mercury/extras && cvs checkout $CHECKOUT_OPTS clpr) ||

-- 
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-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list