diff: separate system and Mercury library variables

Tyson Dowd trd at cs.mu.OZ.AU
Mon Apr 5 23:21:02 AEST 1999


Hi,

Here's another fix needed to get bootstrapping working.

===================================================================


Estimated hours taken: 3

Bootstrapping was a problem on my machine at home -- kept getting
linking errors with the debugging tests.

scripts/ml.in:
	Separate the variables for Mercury libraries from those
	with system libraries.  When bootstrapping we want to
	override the Mercury libraries to use the stage 2 version,
	but we don't want to override other library options such as -ldl
	and -lreadline, because they are system specific while the
	bootstrapping script is general.


? scripts/test_mdbrc
cvs server: Diffing scripts
Index: scripts/ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.57
diff -u -r1.57 ml.in
--- ml.in	1999/03/30 05:45:45	1.57
+++ ml.in	1999/04/05 03:29:47
@@ -384,14 +384,15 @@
 esac
 
 case $trace in
-	true)	TRACE_LIBS="-l$TRACE_LIB_NAME -l$BROWSER_LIB_NAME \
-			$SOCKET_LIBRARY $DL_LIBRARY $READLINE_LIBRARIES"
+	true)	TRACE_LIBS="-l$TRACE_LIB_NAME -l$BROWSER_LIB_NAME"
+		TRACE_LIBS_SYSTEM="$SOCKET_LIBRARY $DL_LIBRARY \
+			$READLINE_LIBRARIES"
 		TRACE_STATIC_LIBS="\
 			$LIBDIR/$GRADE/$FULLARCH/lib$TRACE_LIB_NAME.a \
-			$LIBDIR/$GRADE/$FULLARCH/lib$BROWSER_LIB_NAME.a \
-			$SOCKET_LIBRARY $DL_LIBRARY $READLINE_LIBRARIES"
+			$LIBDIR/$GRADE/$FULLARCH/lib$BROWSER_LIB_NAME.a"
 		;;
 	false)	TRACE_LIBS=
+		TRACE_LIBS_SYSTEM=
 		TRACE_STATIC_LIBS=
 		;;
 esac
@@ -438,16 +439,17 @@
 
 case $mercury_libs in
 	shared)
-		LIBS=${MERCURY_LIBS="$TRACE_LIBS -l$STD_LIB_NAME -l$RT_LIB_NAME $LIBGC $STDLIBS"}
+		MERCURY_LIBS=${MERCURY_LIBS="$TRACE_LIBS -l$STD_LIB_NAME -l$RT_LIB_NAME $LIBGC"}
+		LIBS=${LIBS="$MERCURY_LIBS $STDLIBS $TRACE_LIBS_SYSTEM"}
 		merc_shlib_dirs="$merc_shlib_dirs $LIBDIR/$GRADE/$FULLARCH"
 		merc_shlib_dirs="$merc_shlib_dirs $LIBDIR/$FULLARCH"
 		;;
 	static)
-		LIBS=${MERCURY_LIBS="$TRACE_STATIC_LIBS
+		MERCURY_LIBS=${MERCURY_LIBS="$TRACE_STATIC_LIBS
 			$LIBDIR/$GRADE/$FULLARCH/lib$STD_LIB_NAME.a \
 			$LIBDIR/$GRADE/$FULLARCH/lib$RT_LIB_NAME.a \
-			$LIBGC_STATIC \
-			$STDLIBS"}
+			$LIBGC_STATIC"}
+		LIBS=${LIBS="$MERCURY_LIBS $STDLIBS $TRACE_LIBS_SYSTEM"}
 		merc_shlib_dirs=""
 		;;
 	none)	LIBS="$STDLIBS"


-- 
The quantum sort: 
	while (!sorted) { do_nothing(); }
Tyson Dowd   <tyson at tyse.net>   http://tyse.net/



More information about the developers mailing list