[m-rev.] for post-commit review: add --enable-minimal-install

Julien Fischer jfischer at opturion.com
Tue Jan 8 17:57:38 AEDT 2013


For post-commit review by Paul.

Add a new option to configure, --enable-minimal-install.
When this option is the only library grade that will be installed is the one
that is being used to build the compiler.  (This grade will also be set as the
default grade for the compiler that is being built.)  The intended use of this
option is to allow for the installation of a boostrap system from the source
distribution.

configure.ac:
    Implement --enable-minimal-install.

    Re-order some stuff.

README.boostrap:
    Users building a bootstrap compiler should use the new option
    rather than just doing --enable-libgrades=asm_fast.gc, since
    the latter won't necessarily result in a working system.

.INSTALL.in:
    Document the new option.

Julien.

diff --git a/.INSTALL.in b/.INSTALL.in
index 1d39d42..638b392 100755
--- a/.INSTALL.in
+++ b/.INSTALL.in
@@ -111,6 +111,9 @@ make install
 #          An empty list of grades will cause the library to be installed
 #          only in the default grade.
 #
+#          The option --enable-minimal-install will install only the minimal
+#          system that is required in order to bootstrap the Mercury compiler.
+#
 #          The option --disable-most-grades reduces the set of installed grades
 #          to a "minimum" level for developers (just the default grade and the
 #          grades corresponding to the `--debug' and `--high-level-code'
diff --git a/README.bootstrap b/README.bootstrap
index 71de0ab..e197af6 100644
--- a/README.bootstrap
+++ b/README.bootstrap
@@ -30,7 +30,7 @@ bootstrapping.  After downloading and expanding the
selected prerequisite, the
 following command sequence should be issued:

 ----
-./configure --enable-libgrades=asm_fast.gc
+./configure --enable-minimal-install
 make
 sudo make install
 ----
diff --git a/configure.ac b/configure.ac
index 0773f84..6eb9ed0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3486,6 +3486,11 @@ AC_ARG_ENABLE(stseg-grades,
         [install stack segments versions of the library]),
     [enable_stseg_grades="$enableval"],[enable_stseg_grades="no"])

+AC_ARG_ENABLE(minimal-install,
+    AC_HELP_STRING([--enable-minimal-install],
+        [install the minimal system required to bootstrap Mercury]),
+    [enable_min_install="$enableval"],[enable_min_install="no"])
+
 AC_ARG_ENABLE(minimal-hlc-trail-install,
     AC_HELP_STRING([--enable-minimal-hlc-trail-install],
         [install the minimal system that supports trailing in a high
level C grade]),
@@ -3794,13 +3799,6 @@ then
     LIBGRADES="$LIBGRADES erlang"
 fi

-# If this option is enabled then install a minimal system that supports
-# trailing in a high-level C grade.
-if test "$enable_min_hlc_trail" = yes
-then
-    LIBGRADES="$DEFAULT_BASE_GRADE.gc hlc.gc.trseg"
-fi
-
 # Add `.ssdebug' grades.
 if test "$enable_ssdebug_grades" = yes; then
     # LLDS has better debug grades available.
@@ -3815,6 +3813,25 @@ if test "$enable_ssdebug_grades" = yes; then
     esac
 fi

+# If this option is enabled then install a minimal system that supports
+# trailing in a high-level C grade.
+if test "$enable_min_hlc_trail" = yes
+then
+    LIBGRADES="$DEFAULT_BASE_GRADE.gc hlc.gc.trseg"
+fi
+
+# If this option is enabled then install only the grade that is being
+# used to build the compiler.
+# Also, override the grade that was chosen as the default grade above
+# since it may not match the one that is going to be used to build
+# the compiler.
+#
+if test "$enable_min_install" = yes
+then
+    LIBGRADES="$GRADE"
+    DEFAULT_GRADE="$GRADE"
+fi
+
 # Allow the user to override the default list of library grades

 if test "$enable_libgrades_given" = no -a -f .enable_lib_grades ; then



More information about the reviews mailing list