summaryrefslogtreecommitdiff
blob: f8922bb2e0a9cff272e5aeb848a479a40040e561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- mercury-compiler-0.12.2.orig/configure	2006-01-25 17:24:01.000000000 +1300
+++ mercury-compiler-0.12.2/configure	2006-07-24 20:11:45.000000000 +1200
@@ -8790,34 +8790,34 @@
 
 if test "$BEST_GRADE_FOR_COMPILER" != "$BOOTSTRAP_GRADE"; then
 	if test "$BOOTSTRAP_MC" = ""; then
-		GRADE="$BOOTSTRAP_GRADE"
-		{ echo "$as_me:$LINENO: WARNING: Mercury compiler not yet installed
-****	cannot use grade \`$BEST_GRADE_FOR_COMPILER'
-****	using grade \`$GRADE' to compile the compiler
-****	after installation is complete you should reinstall
-****	from scratch so you can use the more efficient
-****	grade \`$BEST_GRADE_FOR_COMPILER'." >&5
-echo "$as_me: WARNING: Mercury compiler not yet installed
-****	cannot use grade \`$BEST_GRADE_FOR_COMPILER'
-****	using grade \`$GRADE' to compile the compiler
-****	after installation is complete you should reinstall
-****	from scratch so you can use the more efficient
-****	grade \`$BEST_GRADE_FOR_COMPILER'." >&2;}
-
+		if test "$BOOTSTRAP_STAGE" = "1"; then
+			GRADE="$BOOTSTRAP_GRADE"
+		else
+			GRADE=$BEST_GRADE_FOR_COMPILER
+			find library compiler browser mdbcomp analysis \
+				profiler deep_profiler \
+				-name \*.c -o -name \*.c_date | \
+				xargs rm > /dev/null 2>&1
+			find -name \*.o -o -name \*.pic_o -o \
+				-name \*.a -o -name \*.so | \
+				xargs rm > /dev/null 2>&1
+			rm -f compiler/mercury_compile profiler/mercury_profile
+		fi
 	else
-		GRADE=$BEST_GRADE_FOR_COMPILER
-		echo "using grade \`$GRADE' to compile the compiler
-	compiler and library will be rebuilt with new grade
-	installation may take a long time" 1>&6
-		find library compiler browser mdbcomp analysis \
-			profiler deep_profiler \
-			-name \*.c -o -name \*.c_date | \
-			xargs rm > /dev/null 2>&1
+		if test "$BOOTSTRAP_STAGE" = "1"; then
+			GRADE=$BEST_GRADE_FOR_COMPILER
+			find library compiler browser mdbcomp analysis \
+				profiler deep_profiler \
+				-name \*.c -o -name \*.c_date | \
+				xargs rm > /dev/null 2>&1
+		else
+			GRADE=$BEST_GRADE_FOR_COMPILER
+		fi
 	fi
 else
 	GRADE=$BEST_GRADE_FOR_COMPILER
-	echo "using grade \`$GRADE' to compile the compiler" 1>&6
 fi
+echo "using grade \`$GRADE' to compile the compiler" 1>&6
 
 
 #-----------------------------------------------------------------------------#