[m-dev.] for review: Use bootcheck under windows

Peter Ross petdr at cs.mu.OZ.AU
Wed Jun 21 23:03:16 AEST 2000


Hi,


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


Estimated hours taken: 0.5

tools/bootcheck:
    Add the options --windows and --no-sym-links.
    --no-sym-links is for use on systems where 'ln -s' doesn't work.
    --windows translates the paths to the mercury libraries into windows
    format, and sets the extension for library files to be '.lib'.  It
    also implies --no-sym-links.


Index: bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.96
diff -u -r1.96 bootcheck
--- bootcheck	2000/05/15 16:55:29	1.96
+++ bootcheck	2000/06/21 13:00:04
@@ -79,7 +79,11 @@
 		be put into TYPE_STATS_FILE_NAME.tests.$$. Both filenames will
 		be reported in the output of bootcheck, to allow the statistics
 		files to be matched with the bootcheck that created them.
-
+	-W, --windows
+		Translate paths into the windows format and use the extension
+        .lib for libraries, also implies --no-sym-links.
+	--no-sym-links
+		Use this option on systems which don't support symbolic links.
 "
 
 testdirs=""
@@ -98,6 +102,9 @@
 keep_stage_2=false
 keep_stage_3=false
 stop_after_stage_2=false
+windows=no
+use_cp=no
+A=a		# the extension for libraries
 if [ -d compiler/Mercury ]; then
 	use_subdirs=${MMAKE_USE_SUBDIRS=yes}
 else
@@ -186,6 +193,12 @@
 	--type-stats)
 		type_stats="$2"; shift ;;
 
+	-W|--windows)
+		windows=yes; use_cp=yes; A=lib ;;
+
+	--no-sym-links)
+		use_cp=yes ;;
+
 	--)	
 		shift; break ;;
 	-*)
@@ -227,12 +240,23 @@
 
 #-----------------------------------------------------------------------------#
 
-LN="ln"
-LN_S="ln -s"
+if [ $use_cp  = "no" ]
+then
+	LN="ln"
+	LN_S="ln -s"
+else
+	LN="cp -r"
+	LN_S="cp -r"
+fi
 
-# uncomment this code if the file system doesn't support links
-### LN="cp -r"
-### LN_S="cp -r"
+#-----------------------------------------------------------------------------#
+
+if [ $windows = "yes" ]
+then
+	CYGPATH='cygpath -w'
+else
+	CYGPATH='echo'
+fi
 
 #-----------------------------------------------------------------------------#
 
@@ -723,11 +747,11 @@
 	export MERCURY_INT_DIR
 
 	MERCURY_LIBS="
-		$root/${stage2_insert}trace/lib$TRACE_LIB_NAME.a
-		$root/${stage2_insert}browser/lib$BROWSER_LIB_NAME.a
-		$root/${stage2_insert}library/lib$STD_LIB_NAME.a
-		$root/${stage2_insert}runtime/lib$RT_LIB_NAME.a
-		$root/${stage2_insert}boehm_gc/libgc.a
+		`$CYGPATH $root/${stage2_insert}trace/lib$TRACE_LIB_NAME.$A`
+		`$CYGPATH $root/${stage2_insert}browser/lib$BROWSER_LIB_NAME.$A`
+		`$CYGPATH $root/${stage2_insert}library/lib$STD_LIB_NAME.$A`
+		`$CYGPATH $root/${stage2_insert}runtime/lib$RT_LIB_NAME.$A`
+		`$CYGPATH $root/${stage2_insert}boehm_gc/libgc.$A`
 		-lm"
 	export MERCURY_LIBS
 

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