[m-rev.] diff: tools/binary update

Zoltan Somogyi zs at csse.unimelb.edu.au
Fri May 30 12:04:30 AEST 2008


tools/binary:
tools/binary_step:
	Fix oversights in tools/binary and its components. Copy across .int0
	files as well as other .int* files, and be prepared for problems that
	arise in the mdbcomp directory.

Zoltan.

cvs diff: Diffing .
Index: binary
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/binary,v
retrieving revision 1.30
diff -u -b -r1.30 binary
--- binary	20 Feb 2008 03:10:00 -0000	1.30
+++ binary	14 Apr 2008 07:58:56 -0000
@@ -314,6 +314,7 @@
 # cp stage2.ok/library/*.d stage2/library
 cp stage2.ok/library/*.dep stage2/library
 cp stage2.ok/library/*.dv stage2/library
+cp stage2.ok/library/*.int0 stage2/library
 cp stage2.ok/library/*.int3 stage2/library
 cp stage2.ok/library/*.date3 stage2/library
 cp stage2.ok/library/*.int stage2/library
@@ -327,6 +328,7 @@
 # cp stage2.ok/mdbcomp/*.d stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.dep stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.dv stage2/mdbcomp
+cp stage2.ok/mdbcomp/*.int0 stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.int3 stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.date3 stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.int stage2/mdbcomp
@@ -336,6 +338,7 @@
 # cp stage2.ok/compiler/*.d stage2/compiler
 cp stage2.ok/compiler/*.dep stage2/compiler
 cp stage2.ok/compiler/*.dv stage2/compiler
+cp stage2.ok/compiler/*.int0 stage2/compiler
 cp stage2.ok/compiler/*.int3 stage2/compiler
 cp stage2.ok/compiler/*.date3 stage2/compiler
 cp stage2.ok/compiler/*.int stage2/compiler
Index: binary_step
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/binary_step,v
retrieving revision 1.23
diff -u -b -r1.23 binary_step
--- binary_step	20 Feb 2008 03:10:00 -0000	1.23
+++ binary_step	14 Apr 2008 08:09:47 -0000
@@ -46,6 +46,7 @@
 # If you change this, you will also need to change the files indicated
 # in scripts/c2init.in.
 STD_LIB_NAME=mer_std
+MDBCOMP_LIB_NAME=mer_mdbcomp
 
 set -x
 
@@ -168,6 +169,18 @@
 
 sleep 2
 
+touch stage2/library/*.int0
+touch stage2/mdbcomp/*.int0
+touch stage2/compiler/*.int0
+
+sleep 2
+
+touch stage2/library/*.date0
+touch stage2/mdbcomp/*.date0
+touch stage2/compiler/*.date0
+
+sleep 2
+
 touch stage2/library/*.int3
 touch stage2/mdbcomp/*.int3
 touch stage2/compiler/*.int3
@@ -208,9 +221,9 @@
 
 # Rebuild the stage2 library and compiler from the components already there.
 
-/bin/rm -f stage2/library/lib$STD_LIB_NAME.a stage2/library/lib$STD_LIB_NAME.so
-/bin/rm -f stage2/mdbcomp/lib$STD_LIB_NAME.a stage2/library/lib$STD_LIB_NAME.so
-/bin/rm -f stage2/compiler/mercury_compile
+/bin/rm -f stage2/library/lib$STD_LIB_NAME.{a,so}
+/bin/rm -f stage2/mdbcomp/lib$MDBCOMP_LIB_NAME.{a,so}
+/bin/rm -f stage2/compiler/{top_level,mercury_compile}
 
 set -x
 
@@ -265,32 +278,24 @@
 if "$bootcheck"
 then
 
-    # Rebuild the stage3 library and compiler from scratch
+    # Rebuild the stage3 library, mdbcomp and compiler from scratch
 
-    /bin/rm -f stage3/library/*.c
-    /bin/rm -f stage3/library/*.c_date
-    /bin/rm -f stage3/library/*.d
-    /bin/rm -f stage3/library/*.optdate
-    /bin/rm -f stage3/library/*.trans_opt_date
-    /bin/rm -f stage3/library/*.date3
-    /bin/rm -f stage3/library/*.date
-    /bin/rm -f stage3/library/*.opt
-    /bin/rm -f stage3/library/*.trans_opt
-    /bin/rm -f stage3/library/*.int3
-    /bin/rm -f stage3/library/*.int2
-    /bin/rm -f stage3/library/*.int
-    /bin/rm -f stage3/compiler/*.c
-    /bin/rm -f stage3/compiler/*.c_date
-    /bin/rm -f stage3/compiler/*.d
-    /bin/rm -f stage3/compiler/*.optdate
-    /bin/rm -f stage3/compiler/*.trans_opt_date
-    /bin/rm -f stage3/compiler/*.date3
-    /bin/rm -f stage3/compiler/*.date
-    /bin/rm -f stage3/compiler/*.opt
-    /bin/rm -f stage3/compiler/*.trans_opt
-    /bin/rm -f stage3/compiler/*.int3
-    /bin/rm -f stage3/compiler/*.int2
-    /bin/rm -f stage3/compiler/*.int
+    for dir in library mdbcomp compiler
+    do
+        /bin/rm -f stage3/$dir/*.c
+        /bin/rm -f stage3/$dir/*.c_date
+        /bin/rm -f stage3/$dir/*.d
+        /bin/rm -f stage3/$dir/*.optdate
+        /bin/rm -f stage3/$dir/*.trans_opt_date
+        /bin/rm -f stage3/$dir/*.date3
+        /bin/rm -f stage3/$dir/*.date
+        /bin/rm -f stage3/$dir/*.opt
+        /bin/rm -f stage3/$dir/*.trans_opt
+        /bin/rm -f stage3/$dir/*.int3
+        /bin/rm -f stage3/$dir/*.int2
+        /bin/rm -f stage3/$dir/*.int0
+        /bin/rm -f stage3/$dir/*.int
+    done
 
     if (cd stage3 ; mmake $mmake_opts depend_library depend_compiler)
     then
@@ -341,8 +346,7 @@
             for stage3file in stage3/$dir/*.c
             do
                 stage2file="stage2.$basis/$dir/`basename $file`"
-                diff -u $stage2file $stage3file >> $outfile ||
-                    founddiff=true
+                diff -u $stage2file $stage3file >> $outfile || founddiff=true
             done
         done
 
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list