mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
Change things so that LIBGRADES includes the default grade.
Estimated hours taken: 1 Branches: main Change things so that LIBGRADES includes the default grade. This fixes a bug that sometimes caused the libraries not to be installed in the default grade, e.g. when $(GRADE) is set in Mmake.params. configure.in: Don't delete $(GRADE) from $(LIBGRADES). Mmakefile: scripts/Mmake.rules: compiler/make.program_target.m: Change the loops over $(ALL_LIBGRADES) so that they skip $(GRADE). scripts/Mmake.vars.in: Delete an bogus assignment setting LIBGRADES to empty, since it wasn't being used (LIBGRADES was being assigned again below). Update the documentation for LIBGRADES.
This commit is contained in:
@@ -425,8 +425,8 @@ install_grades: scripts
|
||||
# runs the newly installed compiler, rather than using the
|
||||
# bootstrap compiler.
|
||||
#
|
||||
+for grade in x $(LIBGRADES); do \
|
||||
if [ "$$grade" != "x" ]; then \
|
||||
+for grade in $(LIBGRADES); do \
|
||||
if [ "$$grade" != "$(GRADE)" ]; then \
|
||||
gc_grade=`scripts/ml --grade $$grade --print-gc-grade`; \
|
||||
( cd boehm_gc && \
|
||||
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade GC_GRADE=$$gc_grade \
|
||||
@@ -485,7 +485,7 @@ install_split_library: scripts dep_library
|
||||
done || true && \
|
||||
{ mv -f $(deps_subdir)*.dep $(deps_subdir)*.dv *.$O Mercury/os/*.$O \
|
||||
*.$A *.so tmp_dir || true; } && \
|
||||
for grade in $(GRADE) $(LIBGRADES); do \
|
||||
for grade in $(LIBGRADES); do \
|
||||
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade depend && \
|
||||
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_split_library || \
|
||||
{ scripts/mercury_cleanup_install; exit 1; }; \
|
||||
|
||||
@@ -493,8 +493,9 @@ install_library(MainModuleName, Succeeded, Info0, Info) -->
|
||||
{ GradeSucceeded = yes }
|
||||
->
|
||||
% XXX With Mmake, LIBGRADES is target-specific.
|
||||
globals__io_lookup_accumulating_option(libgrades, LibGrades),
|
||||
globals__io_lookup_accumulating_option(libgrades, LibGrades0),
|
||||
globals__io_lookup_bool_option(keep_going, KeepGoing),
|
||||
{ LibGrades = list__delete_all(LibGrades0, Grade) },
|
||||
foldl2_maybe_stop_at_error(KeepGoing,
|
||||
install_library_grade(LinkSucceeded,
|
||||
MainModuleName, AllModules),
|
||||
|
||||
11
configure.in
11
configure.in
@@ -2299,17 +2299,6 @@ fi
|
||||
|
||||
MERCURY_MSG("using \`$LIBGRADES' as the set of library grades to install")
|
||||
|
||||
# Remove GRADE from LIBGRADES. This is done because `mmake install_main'
|
||||
# will have already installed the libraries for grade GRADE.
|
||||
# We can only do this if GRADE is the same as DEFAULT_GRADE,
|
||||
# because LIBGRADES is used both for installing the compiler, which
|
||||
# gets build in grade GRADE, and also for installing user libraries,
|
||||
# which (presumably) get built in in DEFAULT_GRADE.
|
||||
if test $GRADE = $DEFAULT_GRADE; then
|
||||
LIBGRADES=` echo " $LIBGRADES " | sed "s/ $GRADE / /" `
|
||||
fi
|
||||
|
||||
|
||||
LIBGRADE_OPTS=
|
||||
for libgrade in $LIBGRADES
|
||||
do
|
||||
|
||||
@@ -494,8 +494,8 @@ lib%.install_grades:
|
||||
done && \
|
||||
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv \
|
||||
*.a *.so tmp_dir || true; } && \
|
||||
for grade in x $(ALL_LIBGRADES); do \
|
||||
if [ "$$grade" != "x" ]; then \
|
||||
for grade in $(ALL_LIBGRADES); do \
|
||||
if [ "$$grade" != "$(GRADE)" ]; then \
|
||||
$(MMAKE) GRADE=$$grade $*.depend || \
|
||||
exit 1; \
|
||||
$(MMAKE) GRADE=$$grade lib$*.install_library || \
|
||||
@@ -523,8 +523,8 @@ lib%.install_split_grades:
|
||||
mkdir tmp_dir && \
|
||||
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv $($*.mihs) \
|
||||
$($*.dirs) *.a *.so tmp_dir || true; } && \
|
||||
for grade in x $(ALL_LIBGRADES); do \
|
||||
if [ "$$grade" != "x" ]; then \
|
||||
for grade in $(ALL_LIBGRADES); do \
|
||||
if [ "$$grade" != "$(GRADE)" ]; then \
|
||||
$(MMAKE) GRADE=$$grade $*.depend || \
|
||||
exit 1; \
|
||||
$(MMAKE) GRADE=$$grade lib$*.install_split_library || \
|
||||
|
||||
@@ -343,7 +343,6 @@ EXTRA_RANLIBFLAGS =
|
||||
|
||||
# List of grades to install for a library
|
||||
ALL_LIBGRADES = $(TARGET_LIBGRADES) $(EXTRA_TARGET_LIBGRADES)
|
||||
LIBGRADES =
|
||||
EXTRA_LIBGRADES =
|
||||
|
||||
# $(CFLAGS_FOR_PIC) is passed to the C compiler when creating `.pic_o' files
|
||||
@@ -706,7 +705,8 @@ FINAL_INSTALL_MERC_LIB_DIR = \
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# Specify the additional compilation models to install by default
|
||||
# Specify the compilation models to install by default.
|
||||
# This list will include the default grade.
|
||||
LIBGRADES = @LIBGRADES@
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
Reference in New Issue
Block a user