[m-rev.] for review: lmc and boehm gc library versions

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Apr 26 19:26:58 AEST 2001


For review by Fergus.

tools/lmc:
	Use whatever version of the boehm_gc library exists in the boehm_gc
	directory, instead of blindly using the name of a possibly
	inappropriate and non-existent version.

	Do not require MMC_DEBUG to be set to a particular value to be
	effective; simply require it to be set to *some* value.

Zoltan.

Index: lmc
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/lmc,v
retrieving revision 1.2
diff -u -b -r1.2 lmc
--- lmc	2001/03/08 06:51:02	1.2
+++ lmc	2001/04/26 09:23:05
@@ -30,7 +30,26 @@
 export MERCURY_COMPILER
 MERCURY_INT_DIR=$WORKSPACE/library
 export MERCURY_INT_DIR
-MERCURY_LIBS="$WORKSPACE/trace/libmer_trace.a $WORKSPACE/browser/libmer_browser.a $WORKSPACE/library/libmer_std.a $WORKSPACE/runtime/libmer_rt.a $WORKSPACE/boehm_gc/libgc.a -lm"
+
+if test ! -d $WORKSPACE
+then
+	echo "workspace $WORKSPACE does not exist"
+fi
+
+if test -s $WORKSPACE/boehm_gc/libgc.a
+then
+	gclib="$WORKSPACE/boehm_gc/libgc.a"
+elif test -s $WORKSPACE/boehm_gc/libpar_gc.a
+then
+	gclib="$WORKSPACE/boehm_gc/libpar_gc.a"
+elif test -s $WORKSPACE/boehm_gc/libgc_prof.a
+then
+	gclib="$WORKSPACE/boehm_gc/libgc_prof.a"
+else
+	echo "$WORKSPACE/boehm_gc does not have a gc library"
+fi
+
+MERCURY_LIBS="$WORKSPACE/trace/libmer_trace.a $WORKSPACE/browser/libmer_browser.a $WORKSPACE/library/libmer_std.a $WORKSPACE/runtime/libmer_rt.a $gclib -lm"
 export MERCURY_LIBS
 MERCURY_ALL_C_INCL_DIRS="-I$WORKSPACE/runtime -I$WORKSPACE/trace -I$WORKSPACE/boehm_gc -I$WORKSPACE/boehm_gc/include"
 export MERCURY_ALL_C_INCL_DIRS
@@ -43,16 +62,16 @@
 PATH="$WORKSPACE/scripts:$WORKSPACE/util:$PATH"
 export PATH
 
-if test "$MMC_CDEBUG" = true
+if test "$MMC_CDEBUG" != ""
 then
 	CDEBUG_FLAGS="--link-flags -g --cflags -g"
 else
 	CDEBUG_FLAGS=""
 fi
 
-DIR_FLAGS="--cflags -I$WORKSPACE/trace --cflags -I$WORKSPACE/runtime --cflags -I$WORKSPACE/boehm_gc --cflags -I$WORKSPACE/boehm_gc/include"
+DIR_FLAGS="--cflags -I$WORKSPACE/trace --cflags -I$WORKSPACE/runtime --cflags -I$WORKSPACE/boehm_gc --cflags -I$WORKSPACE/boehm_gc/include -I$WORKSPACE/library"
 
-if test "$MMC_UNDER_GDB" = true
+if test "$MMC_UNDER_GDB" != ""
 then
 	MERCURY_COMPILER="$WORKSPACE/tools/gdbrun $MERCURY_COMPILER"
 	export MERCURY_COMPILER
--------------------------------------------------------------------------
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