[m-dev.] for review: LIBGRADES

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Nov 28 13:41:20 AEDT 2000


configure.in:
	Add options that allow the user to specify the set of library grades
	more precisely. Also add an option, --enable-minimum-grades,
	that reduces the installed grades to the minimum (asm_fast.gc,
	asm_fast.gc.debug.tr and hlc.gc), since this is useful to minimize
	installation time e.g. when installing a release of the day on a
	laptop.

Zoltan.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.235
diff -u -b -r1.235 configure.in
--- configure.in	2000/11/23 06:46:25	1.235
+++ configure.in	2000/11/28 02:39:30
@@ -1784,37 +1784,93 @@
 [  --enable-all-grades     install all the different versions of the library],
 enable_all_grades="$enableval",enable_all_grades=no)
 
+AC_ARG_ENABLE(nogc-grades,
+[  --enable-nogc-grades    install no-gc versions of the library],
+enable_nogc_grades="$enableval",enable_nogc_grades=yes)
+
+AC_ARG_ENABLE(profiling-grades,
+[  --enable-profiling-grades install profiling versions of the library],
+enable_profiling_grades="$enableval",enable_profiling_grades=yes)
+
+AC_ARG_ENABLE(trailing-grades,
+[  --enable-trailing-grades  install trailing versions of the library],
+enable_trailing_grades="$enableval",enable_trailing_grades=yes)
+
+AC_ARG_ENABLE(all-hlc-grades,
+[  --enable-all-hlc-grades install all the hlc grades],
+enable_all_hlc_grades=yes,enable_all_hlc_grades=no)
+
+AC_ARG_ENABLE(par-grades,
+[  --enable-par-grades     install thread-safe versions of the library],
+enable_par_grades="$enableval",enable_par_grades=yes)
+
+AC_ARG_ENABLE(minimum-grades,
+[  --enable-minimum-grades install only the essential versions of the library],
+minimum_grades="$enableval",minimum_grades=no)
+
+if test "$minimum_grades" = yes; then
+	enable_all_grades=no
+	enable_nogc_grades=no
+	enable_profiling_grades=no
+	enable_trailing_grades=no
+	enable_all_hlc_grades=no
+	enable_par_grades=no
+fi
+
 if test "$enable_all_grades" = yes; then
-	LIBGRADES="$ALL_LIBGRADES"
+	BASE_LIBGRADES="$ALL_LIBGRADES"
 else
-	LIBGRADES="$BEST_GRADE"
+	BASE_LIBGRADES="$BEST_GRADE"
 fi
 
-# add `.gc' (--conservative-gc) grades
-for grade in $LIBGRADES; do
-	LIBGRADES="$LIBGRADES $grade.gc"
+# find all `.gc' (--conservative-gc) grades
+GC_LIBGRADES=""
+for grade in $BASE_LIBGRADES; do
+	GC_LIBGRADES="$GC_LIBGRADES $grade.gc"
 done
 
-# add `.prof' (--profiling) grades, if time profiling is supported,
-# and a `.memprof' (--memory-profiling) grade.
-if test $mercury_cv_profiling = yes; then
+if test "$enable_nogc_grades" = yes; then
+	LIBGRADES="$BASE_LIBGRADES $GC_LIBGRADES"
+else
+	LIBGRADES="$GC_LIBGRADES"
+fi
+
+if test "$enable_nogc_grades" = yes; then
+	# add `.prof' (--profiling) grades, if time profiling is supported,
+	# and a `.memprof' (--memory-profiling) grade.
+	if test $mercury_cv_profiling = yes; then
+		if test "$enable_nogc_grades" = yes; then
 	DEFAULT_GRADE_NOGC="`echo $DEFAULT_GRADE | sed 's/\.gc$//'`"
 	LIBGRADES="$LIBGRADES $DEFAULT_GRADE.prof $DEFAULT_GRADE_NOGC.prof"
+		else
+			LIBGRADES="$LIBGRADES $DEFAULT_GRADE.prof"
+		fi
 	if test $GRADE != $DEFAULT_GRADE; then
+			if test "$enable_nogc_grades" = yes; then
 		GRADE_NOGC="`echo $GRADE | sed 's/\.gc$//'`"
 		LIBGRADES="$LIBGRADES $GRADE.prof $GRADE_NOGC.prof"
+			else
+				LIBGRADES="$LIBGRADES $GRADE.prof"
+			fi
+		fi
 	fi
+	LIBGRADES="$LIBGRADES $DEFAULT_GRADE.memprof"
 fi
-LIBGRADES="$LIBGRADES $DEFAULT_GRADE.memprof"
 
-# add `.tr' (--trailing) grades
-LIBGRADES="$LIBGRADES $DEFAULT_GRADE.tr"
-if test "$enable_all_grades" = yes; then
+if test "$enable_trailing_grades" = yes; then
+	# add `.tr' (--trailing) grades
+	LIBGRADES="$LIBGRADES $DEFAULT_GRADE.tr"
+	if test "$enable_all_grades" = yes; then
+		if test "$enable_nogc_grades" = yes; then
 	DEFAULT_GRADE_NOGC="`echo $DEFAULT_GRADE | sed 's/\.gc$//'`"
 	LIBGRADES="$LIBGRADES $DEFAULT_GRADE_NOGC.tr"
-	if test $mercury_cv_profiling = yes; then
+		else
+			LIBGRADES="$LIBGRADES"
+		fi
+		if test $mercury_cv_profiling = yes -a "$enable_profiling_grades" = yes; then
 		LIBGRADES="$LIBGRADES $DEFAULT_GRADE.prof.tr"
 	fi
+	fi
 fi
 
 # add `.debug' (--debug) grades
@@ -1823,10 +1879,6 @@
 # add `hlc' (--high-level-code, i.e. MLDS back-end) grades
 LIBGRADES="$LIBGRADES hlc.gc"
 
-AC_ARG_ENABLE(all-hlc-grades,
-[  --enable-all-hlc-grades install all the hlc grades],
-enable_all_hlc_grades=yes,enable_all_hlc_grades=no)
-
 if test $enable_all_hlc_grades = "yes" -o $ac_microsoft = "yes"; then
 	# add `.prof' (--profiling) grades, if time profiling is supported,
 	# and a `.memprof' (--memory-profiling) grade.
@@ -1836,8 +1888,10 @@
 	LIBGRADES="$LIBGRADES hlc.gc.memprof"
 fi
 
-# Add the .par grade
-LIBGRADES="$LIBGRADES hlc.par.gc"
+if test "$enable_par_grades" = yes; then
+	# Add the .par grade
+	LIBGRADES="$LIBGRADES hlc.par.gc"
+fi
 
 # If we are using the Microsoft compiler then use hlc.gc as the default
 # grade.
--------------------------------------------------------------------------
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