mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-11 03:45:33 +00:00
Estimated hours taken: 8 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.
50 lines
1.3 KiB
Bash
50 lines
1.3 KiB
Bash
#! /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'
|
|
@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'
|
|
@FINAL_GRADE_OPTIONS@
|
|
|
|
# include the file `canonical_grade.sh-subr'
|
|
@CANONICAL_GRADE@
|
|
|
|
echo $GRADE
|
|
exit 0
|