[m-dev.] for review: specifying library grades
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon Dec 18 16:22:08 AEDT 2000
On 08-Dec-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Apart from that it looks fine, but I'd like to see a relative diff.
Here is the updated log message and full diff.
Add options to configure that allow the user to specify the set of library
grades to be installed more precisely.
configure.in:
Add an option --enable-libgrade=<gradelist> that specifies
the list of library grades precisely.
Add an option, --disable-most-grades, that reduces the installed
grades to a "minimum" level for developers (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.
Add an option, --disable-nogc-grades, that prevents the installation
of grades without garbage collection.
Add an option, --disable-prof-grades, that prevents the installation
of profiling grades.
Add an option, --disable-trail-grades, that prevents the installation
of trailing grades.
Add an option, --disable-pair-grades, that prevents the installation
of thread-safe grades.
.INSTALL.in:
Mention the new configure options, as well as some previously
undocumented old ones.
scripts/canonical_grade.in:
A new script to be used by configure.in. Its jobs is to print the
canonical version of a grade string.
scripts/canonical_grade.sh-subr:
A new sh subroutine, containing code previously from ml.in that is
now also needed by canonical_grade.in.
scripts/ml.in:
Move code from here to canonical_grade.sh-subr.
Mmakefile:
Include scripts/canonical_grade in tar files, since configure.in
needs it.
bindist/Mmakefile:
Include scripts/canonical_grade in binary distributions, since
configure.in needs it.
Zoltan.
cvs diff: Diffing .
Index: .INSTALL.in
===================================================================
RCS file: /home/mercury1/repository/mercury/.INSTALL.in,v
retrieving revision 1.6
diff -u -b -r1.6 .INSTALL.in
--- .INSTALL.in 2000/09/08 09:40:01 1.6
+++ .INSTALL.in 2000/12/18 05:08:25
@@ -29,9 +29,15 @@
# files in /usr/local/bin, /usr/local/lib et cetera,
# *not* /usr/local/mercury/bin, /usr/local/mercury/lib.
#
-# The output from this stage will be automatically saved in the
-# file `configure.log'. Some debugging output is also saved to
-# the file `config.log'.
+# By default, the installation process will install the Mercury
+# standard library in a comprehensive set of grades, with each grade
+# supporting a given set of capabilities (debugging, profiling etc).
+# If you want to install a different set of grades, read the
+# "Finetuning" section below.
+#
+# The output from running configure will be automatically saved
+# in the file `configure.log'. Some debugging output is also
+# saved to the file `config.log'.
#
# Step 2. Run `make'.
# This step will take a long time.
@@ -98,12 +104,34 @@
#
# By default the `make install' step will install a reasonable
# set of library grades which should be appropriate for most uses.
-# If you want to install all the possible library grades,
-# rather than just the most useful few, use the `--enable-all-grades'
-# option to configure. Conversely, if you are very short
-# of disk space, you can add the line "LIBGRADES="
-# to the file Mmake.params before installing. This tells it
-# to install only a single grade of the libraries.
+#
+# The option --enable-libgrade=<gradelist> allows you to specify
+# precisely the list of library grades to be installed. An empty
+# list of grades will cause the library to be installed only in
+# the default grade.
+#
+# The option --disable-most-grades reduces the set of installed grades
+# to a "minimum" level for developers (asm_fast.gc,
+# asm_fast.gc.debug.tr and hlc.gc).
+#
+# The option --disable-nogc-grades prevents the installation
+# of grades without garbage collection.
+#
+# The option --disable-prof-grades prevents the installation
+# of grades that support profiling.
+#
+# The option --disable-trail-grades prevents the installation
+# of grades that support trailing.
+#
+# The option --disable-par-grades prevents the installation
+# of thread-safe grades.
+#
+# The option --enable-inefficient-grades causes the installation
+# of grades that do not exploit gcc extensions even when they are
+# available.
+#
+# The option --enable-hlc-prof-grades causes the installation
+# of profiling versions of the high level code grades.
#
# If you are short on RAM, you can add -DSMALL_CONFIG to the CFLAGS
# line in the file boehm_gc/Makefile. (This tells the garbage
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.61
diff -u -b -r1.61 Mmakefile
--- Mmakefile 2000/11/29 00:10:07 1.61
+++ Mmakefile 2000/12/06 04:06:10
@@ -215,6 +215,7 @@
-cd bindist && $(SUBDIR_MMAKE) bindist.build_vars
# clean up
cd scripts && mmake realclean
+ cd scripts && mmake canonical_grade
cd util && mmake realclean
cd doc && mmake distclean
-rm -f errs errs2 update.log
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.237
diff -u -b -r1.237 configure.in
--- configure.in 2000/12/01 03:22:14 1.237
+++ configure.in 2000/12/15 07:41:31
@@ -1787,7 +1787,7 @@
fi
#
-# Figure out which grades to use if --enable-all-grades is specified.
+# Figure out which grades to use if --enable-inefficient-grades is specified.
#
ALL_LIBGRADES="none"
if test $mercury_cv_gcc_model_reg = yes; then
@@ -1808,41 +1808,103 @@
fi
fi
-AC_ARG_ENABLE(all-grades,
-[ --enable-all-grades install all the different versions of the library],
-enable_all_grades="$enableval",enable_all_grades=no)
+AC_ARG_ENABLE(inefficient-grades,
+[ --enable-inefficient-grades
+ install inefficient versions of the library],
+enable_inefficient_grades="$enableval",enable_inefficient_grades=no)
+
+AC_ARG_ENABLE(most-grades,
+[ --disable-most-grades install only the essential versions of the library],
+enable_most_grades="$enableval",enable_most_grades=yes)
+
+AC_ARG_ENABLE(nogc-grades,
+[ --disable-nogc-grades do not install no-gc versions of the library],
+enable_nogc_grades="$enableval",enable_nogc_grades=yes)
+
+AC_ARG_ENABLE(prof-grades,
+[ --disable-prof-grades do not install profiling versions of the library],
+enable_prof_grades="$enableval",enable_prof_grades=yes)
+
+AC_ARG_ENABLE(trail-grades,
+[ --disable-trail-grades do not install trailing versions of the library],
+enable_trail_grades="$enableval",enable_trail_grades=yes)
+
+AC_ARG_ENABLE(par-grades,
+[ --disable-par-grades do not install thread-safe versions of the library],
+enable_par_grades="$enableval",enable_par_grades=yes)
+
+AC_ARG_ENABLE(hlc-prof-grades,
+[ --enable-hlc-prof-grades
+ install profiling versions of the high level C grade],
+enable_hlc_prof_grades=yes,enable_hlc_prof_grades=no)
+
+AC_ARG_ENABLE(libgrades,
+[ --enable-libgrades=... install exactly the given versions of the library],
+enable_libgrades_given=yes;enable_libgrades="$enableval",enable_libgrades_given=no)
+
+if test "$enable_most_grades" = no; then
+ enable_inefficient_grades=no
+ enable_nogc_grades=no
+ enable_prof_grades=no
+ enable_trail_grades=no
+ enable_hlc_prof_grades=no
+ enable_par_grades=no
+fi
-if test "$enable_all_grades" = yes; then
- LIBGRADES="$ALL_LIBGRADES"
+if test "$enable_inefficient_grades" = yes; then
+ 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
+
+if test "$enable_nogc_grades" = yes; then
+ LIBGRADES="$BASE_LIBGRADES $GC_LIBGRADES"
+else
+ LIBGRADES="$GC_LIBGRADES"
+fi
-# 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
+ # 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_prof_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_trail_grades" = yes; then
+ # add `.tr' (--trailing) grades
+ LIBGRADES="$LIBGRADES $DEFAULT_GRADE.tr"
+ if test "$enable_inefficient_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_prof_grades" = yes; then
LIBGRADES="$LIBGRADES $DEFAULT_GRADE.prof.tr"
fi
+ fi
fi
# add `.debug' (--debug) grades
@@ -1851,21 +1913,57 @@
# 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
+if test $enable_hlc_prof_grades = "yes" -o $ac_microsoft = "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 $mercury_cv_profiling = yes -a "$enable_prof_grades" = yes; then
LIBGRADES="$LIBGRADES hlc.gc.prof"
fi
LIBGRADES="$LIBGRADES hlc.gc.memprof"
fi
+
+if test "$enable_par_grades" = yes; then
+ # Add the .par grade
+ LIBGRADES="$LIBGRADES hlc.par.gc"
+fi
+
+if test "$enable_libgrades_given" = yes; then
+ if test "$enable_libgrades" = no; then
+ MERCURY_MSG("--enable-libgrades requires a comma-separated list of grades as argument")
+ MERCURY_MSG("aborting configure")
+ exit 1
+ elif test "$enable_libgrades" = yes; then
+ MERCURY_MSG("--enable-libgrades requires a comma-separated list of grades as argument")
+ MERCURY_MSG("aborting configure")
+ exit 1
+ else
+ # Generate only the grades specified by the user.
+ raw_grades=`echo $enable_libgrades | sed 's/,/ /g'`
+ canonical_grades=""
+ grade_error=false
+ for raw_grade in $raw_grades
+ do
+ if scripts/canonical_grade --grade $raw_grade > .confgrade
+ then
+ canonical_grades="$canonical_grades `cat .confgrade`"
+ else
+ MERCURY_MSG("--enable-libgrades: $raw_grade is not a grade")
+ grade_error=true
+ fi
+ done
+
+ rm -f .confgrade > /dev/null 2>&1
+
+ if $grade_error
+ then
+ comma=","
+ MERCURY_MSG("invalid grade(s) specified for --enable-libgrades$comma aborting configure")
+ exit 1
+ fi
-# Add the .par grade
-LIBGRADES="$LIBGRADES hlc.par.gc"
+ LIBGRADES=$canonical_grades
+ fi
+fi
# If we are using the Microsoft compiler then use hlc.gc as the default
# grade.
@@ -1885,6 +1983,7 @@
MERCURY_MSG("using \`LIBGRADES=$LIBGRADES' as the set of library grades to install")
AC_SUBST(LIBGRADES)
+
#-----------------------------------------------------------------------------#
#
# Add an option that disables declarative debugging support in the internal
@@ -2264,9 +2363,11 @@
INIT_GRADE_OPTIONS=$top/scripts/init_grade_options.sh-subr
PARSE_GRADE_OPTIONS=$top/scripts/parse_grade_options.sh-subr
FINAL_GRADE_OPTIONS=$top/scripts/final_grade_options.sh-subr
+CANONICAL_GRADE=$top/scripts/canonical_grade.sh-subr
AC_SUBST_FILE(INIT_GRADE_OPTIONS)
AC_SUBST_FILE(PARSE_GRADE_OPTIONS)
AC_SUBST_FILE(FINAL_GRADE_OPTIONS)
+AC_SUBST_FILE(CANONICAL_GRADE)
#-----------------------------------------------------------------------------#
#
@@ -2496,7 +2597,8 @@
AC_MSG_CHECKING(whether to enable the new MercuryFile struct)
AC_ARG_ENABLE(new-mercuryfile-struct,
-[ --enable-new-mercuryfile-struct enable new MercuryFile struct.],
+[ --enable-new-mercuryfile-struct
+ enable new MercuryFile struct.],
ac_new_mercuryfile_struct=yes,ac_new_mercuryfile_struct=no)
if test "$ac_new_mercuryfile_struct" = "yes"; then
cvs diff: Diffing bindist
Index: bindist/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/Mmakefile,v
retrieving revision 1.27
diff -u -b -r1.27 Mmakefile
--- bindist/Mmakefile 2000/09/06 05:30:07 1.27
+++ bindist/Mmakefile 2000/12/06 04:08:56
@@ -34,6 +34,7 @@
SCRIPT_FILES = ../scripts/*.in ../scripts/*.sh-subr \
../scripts/Mmake.rules \
+ ../scripts/canonical_grade \
../scripts/gud.el
CONFIG_FILES = ../config.sub ../config.guess ../install-sh
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
Index: scripts/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmakefile,v
retrieving revision 1.20
diff -u -b -r1.20 Mmakefile
--- scripts/Mmakefile 2000/02/01 22:08:37 1.20
+++ scripts/Mmakefile 2000/12/04 02:24:14
@@ -16,7 +16,7 @@
SCRIPTS = mmake mmc mdb c2init mgnuc ml mprof mprof_merge_runs \
sicstus_conv mtags vpath_find mercury_update_interface \
- mkfifo_using_mknod mercury_cleanup_install
+ mkfifo_using_mknod mercury_cleanup_install canonical_grade
DEBUGGER_SCRIPTS = mdbrc
EMACS_SCRIPTS = gud.el
@@ -37,9 +37,10 @@
#-----------------------------------------------------------------------------#
-ml mgnuc: init_grade_options.sh-subr
-ml mgnuc: parse_grade_options.sh-subr
-ml mgnuc: final_grade_options.sh-subr
+ml mgnuc canonical_grade: init_grade_options.sh-subr
+ml mgnuc canonical_grade: parse_grade_options.sh-subr
+ml mgnuc canonical_grade: final_grade_options.sh-subr
+ml canonical_grade: canonical_grade.sh-subr
#-----------------------------------------------------------------------------#
Index: scripts/canonical_grade.in
===================================================================
RCS file: canonical_grade.in
diff -N canonical_grade.in
--- /dev/null Thu Sep 2 15:00:04 1999
+++ canonical_grade.in Mon Dec 11 16:39:28 2000
@@ -0,0 +1,49 @@
+#! /bin/sh
+#---------------------------------------------------------------------------#
+# Copyright (C) 2000 The University of Melbourne.
+# This file may only be copied under the terms of the GNU General
+# Public License - see the file COPYING in the Mercury distribution.
+#---------------------------------------------------------------------------#
+#
+# canonical_grade --grade <grade-to-be-canonicalized>
+#
+# This script is meant to be used mainly during the autoconfiguration process.
+# It is meant to be invoked with a --grade <grade> option, whose value should
+# be a possibly noncanonical grade name given by a human as part of an argument
+# to the configure script. The job of this script is to print the canonical
+# name of the grade. The script fails after printing an error message if the
+# purported "grade" given is not a grade at all, not even a non-canonical one.
+
+# include the file `init_grade_options.sh-subr'
+ at INIT_GRADE_OPTIONS@
+
+usage="Usage: canonical_grade --grade <actual>"
+
+while : ; do
+ case "$1" in
+ # include the file `parse_grade_options.sh-subr'
+ @PARSE_GRADE_OPTIONS@
+
+ --)
+ shift
+ break ;;
+ *)
+ break ;;
+ esac
+ shift
+done
+
+if test $# -ne 0
+then
+ echo "$usage"
+ exit 1
+fi
+
+# include the file `final_grade_options.sh-subr'
+ at FINAL_GRADE_OPTIONS@
+
+# include the file `canonical_grade.sh-subr'
+ at CANONICAL_GRADE@
+
+echo $GRADE
+exit 0
Index: scripts/canonical_grade.sh-subr
===================================================================
RCS file: canonical_grade.sh-subr
diff -N canonical_grade.sh-subr
--- /dev/null Thu Sep 2 15:00:04 1999
+++ canonical_grade.sh-subr Wed Dec 6 14:16:12 2000
@@ -0,0 +1,108 @@
+#---------------------------------------------------------------------------#
+# Copyright (C) 2000 The University of Melbourne.
+# This file may only be copied under the terms of the GNU General
+# Public License - see the file COPYING in the Mercury distribution.
+#---------------------------------------------------------------------------#
+#
+# canonical_grade.sh-subr:
+# An `sh' subroutine for computing a canonical grade string based on
+# the values of grade-related options.
+# It is used by the `ml' and `canonical_grade' scripts.
+#
+# The code here should be inserted after init_grade_options.sh-subr,
+# parse_grade_options.sh-subr and final_grade_options.sh-subr, which
+# together define a set of shell variables giving the values of the
+# various grade options.
+#
+# Canonical_grade.sh-subr defines the variable GRADE, which will contain
+# the canonical string for the grade implied by the option values.
+#
+# If the option values are inconsistent, this script fragment will
+# print an error message and exit with failure.
+#
+# IMPORTANT: any changes to the handling of grades here may also require
+# changes to all the files indicated by runtime/mercury_grade.h.
+
+case $non_local_gotos,$global_regs in
+ true,true) GRADE="fast" ;;
+ true,false) GRADE="jump" ;;
+ false,true) GRADE="reg" ;;
+ false,false) GRADE="none" ;;
+esac
+
+case $asm_labels in
+ true) GRADE="asm_$GRADE" ;;
+ false) ;;
+esac
+
+case $highlevel_code,$highlevel_data,$GRADE in
+ true,true,none)
+ GRADE="hl" ;;
+ true,false,none)
+ GRADE="hlc" ;;
+ false,false,*)
+ # GRADE was set above
+ ;;
+ false,true,*)
+ progname=`basename $0`
+ echo "$progname: error: \`--high-level-data' requires \`--high-level-code'" 1>&2
+ exit 1
+ ;;
+ *)
+ echo "$progname: error: \`--high-level-code' is incompatible with the use of" 1>&2
+ echo "$progname: error: low-level gcc extensions implied by grade \`$GRADE'" 1>&2
+ exit 1
+ ;;
+esac
+
+case $gcc_nested_functions,$highlevel_code in
+ true,true) GRADE="${GRADE}_nest" ;;
+ *) ;;
+esac
+
+case $thread_safe in
+ true) GRADE="$GRADE.par" ;;
+ false) ;;
+esac
+
+case $gc_method in
+ conservative) GRADE="$GRADE.gc" ;;
+ accurate) GRADE="$GRADE.agc" ;;
+esac
+
+case $profile_time,$profile_calls,$profile_memory in
+ true,true,false) GRADE="$GRADE.prof" ;;
+ true,false,false) GRADE="$GRADE.proftime" ;;
+ false,true,false) GRADE="$GRADE.profcalls" ;;
+ true,true,true) GRADE="$GRADE.profall" ;;
+ false,true,true) GRADE="$GRADE.memprof" ;;
+ false,false,false) ;;
+ *) progname=`basename $0`
+ echo "$progname: error: invalid combination of profiling options." 1>&2
+ exit 1
+ ;;
+esac
+
+case $use_trail in
+ true) GRADE="$GRADE.tr" ;;
+ false) ;;
+esac
+
+case $use_minimal_model in
+ true) GRADE="$GRADE.mm" ;;
+ false) ;;
+esac
+
+# We ignore the value of $picreg in computing the name of the grade
+# that we will use as a directory name in the Mercury linker.
+# case $picreg in
+# true) GRADE="$GRADE.picreg" ;;
+# false) ;;
+# esac
+
+case $stack_trace,$require_tracing in
+ true,true) GRADE="$GRADE.debug" ;;
+ false,true) GRADE="$GRADE.trace" ;;
+ true,false) GRADE="$GRADE.strce" ;;
+ false,false) ;;
+esac
Index: scripts/ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.88
diff -u -b -r1.88 ml.in
--- scripts/ml.in 2000/12/09 07:36:19 1.88
+++ scripts/ml.in 2000/12/11 04:41:21
@@ -440,83 +440,11 @@
esac
#
-# compute the grade from the options settings
+# compute the canonical grade name from the options settings
#
-case $non_local_gotos,$global_regs in
- true,true) GRADE="fast" ;;
- true,false) GRADE="jump" ;;
- false,true) GRADE="reg" ;;
- false,false) GRADE="none" ;;
-esac
-case $asm_labels in
- true) GRADE="asm_$GRADE" ;;
- false) ;;
-esac
-case $highlevel_code,$highlevel_data,$GRADE in
- true,true,none)
- GRADE="hl" ;;
- true,false,none)
- GRADE="hlc" ;;
- false,false,*)
- # GRADE was set above
- ;;
- false,true,*)
- echo "\`--high-level-data' requires \`--high-level-code'" 1>&2
- exit 1
- ;;
- *)
- echo "\`--high-level-code' is incompatible with the use of" 1>&2
- echo "low-level gcc extensions implied by grade \`$GRADE'" 1>&2
- exit 1
- ;;
-esac
-case $gcc_nested_functions,$highlevel_code in
- true,true) GRADE="${GRADE}_nest" ;;
- *) ;;
-esac
-
-case $thread_safe in
- true) GRADE="$GRADE.par" ;;
- false) ;;
-esac
-case $gc_method in
- conservative) GRADE="$GRADE.gc" ;;
- accurate) GRADE="$GRADE.agc" ;;
-esac
-case $profile_time,$profile_calls,$profile_memory in
- true,true,false) GRADE="$GRADE.prof" ;;
- true,false,false) GRADE="$GRADE.proftime" ;;
- false,true,false) GRADE="$GRADE.profcalls" ;;
- true,true,true) GRADE="$GRADE.profall" ;;
- false,true,true) GRADE="$GRADE.memprof" ;;
- false,false,false) ;;
- *) progname=`basename $0`
- echo \
- "$progname: Error: invalid combination of profiling options." 1>&2
- exit 1
- ;;
-esac
-case $use_trail in
- true) GRADE="$GRADE.tr" ;;
- false) ;;
-esac
-case $use_minimal_model in
- true) GRADE="$GRADE.mm" ;;
- false) ;;
-esac
-# We ignore the value of $picreg in computing the name of the grade
-# that we will use as a directory name below.
-# case $picreg in
-# true) GRADE="$GRADE.picreg" ;;
-# false) ;;
-# esac
-case $stack_trace,$require_tracing in
- true,true) GRADE="$GRADE.debug" ;;
- false,true) GRADE="$GRADE.trace" ;;
- true,false) GRADE="$GRADE.strce" ;;
- false,false) ;;
-esac
+# include the file `canonical_grade.sh-subr'
+ at CANONICAL_GRADE@
# if the --print-grade option is specified,
# then all we do is print the grade and then exit
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing trial
cvs diff: Diffing util
--------------------------------------------------------------------------
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