mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 05:44:58 +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
|
# runs the newly installed compiler, rather than using the
|
||||||
# bootstrap compiler.
|
# bootstrap compiler.
|
||||||
#
|
#
|
||||||
+for grade in x $(LIBGRADES); do \
|
+for grade in $(LIBGRADES); do \
|
||||||
if [ "$$grade" != "x" ]; then \
|
if [ "$$grade" != "$(GRADE)" ]; then \
|
||||||
gc_grade=`scripts/ml --grade $$grade --print-gc-grade`; \
|
gc_grade=`scripts/ml --grade $$grade --print-gc-grade`; \
|
||||||
( cd boehm_gc && \
|
( cd boehm_gc && \
|
||||||
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade GC_GRADE=$$gc_grade \
|
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade GC_GRADE=$$gc_grade \
|
||||||
@@ -485,7 +485,7 @@ install_split_library: scripts dep_library
|
|||||||
done || true && \
|
done || true && \
|
||||||
{ mv -f $(deps_subdir)*.dep $(deps_subdir)*.dv *.$O Mercury/os/*.$O \
|
{ mv -f $(deps_subdir)*.dep $(deps_subdir)*.dv *.$O Mercury/os/*.$O \
|
||||||
*.$A *.so tmp_dir || true; } && \
|
*.$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 depend && \
|
||||||
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_split_library || \
|
$(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_split_library || \
|
||||||
{ scripts/mercury_cleanup_install; exit 1; }; \
|
{ scripts/mercury_cleanup_install; exit 1; }; \
|
||||||
|
|||||||
@@ -493,8 +493,9 @@ install_library(MainModuleName, Succeeded, Info0, Info) -->
|
|||||||
{ GradeSucceeded = yes }
|
{ GradeSucceeded = yes }
|
||||||
->
|
->
|
||||||
% XXX With Mmake, LIBGRADES is target-specific.
|
% 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),
|
globals__io_lookup_bool_option(keep_going, KeepGoing),
|
||||||
|
{ LibGrades = list__delete_all(LibGrades0, Grade) },
|
||||||
foldl2_maybe_stop_at_error(KeepGoing,
|
foldl2_maybe_stop_at_error(KeepGoing,
|
||||||
install_library_grade(LinkSucceeded,
|
install_library_grade(LinkSucceeded,
|
||||||
MainModuleName, AllModules),
|
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")
|
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=
|
LIBGRADE_OPTS=
|
||||||
for libgrade in $LIBGRADES
|
for libgrade in $LIBGRADES
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -494,8 +494,8 @@ lib%.install_grades:
|
|||||||
done && \
|
done && \
|
||||||
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv \
|
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv \
|
||||||
*.a *.so tmp_dir || true; } && \
|
*.a *.so tmp_dir || true; } && \
|
||||||
for grade in x $(ALL_LIBGRADES); do \
|
for grade in $(ALL_LIBGRADES); do \
|
||||||
if [ "$$grade" != "x" ]; then \
|
if [ "$$grade" != "$(GRADE)" ]; then \
|
||||||
$(MMAKE) GRADE=$$grade $*.depend || \
|
$(MMAKE) GRADE=$$grade $*.depend || \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
$(MMAKE) GRADE=$$grade lib$*.install_library || \
|
$(MMAKE) GRADE=$$grade lib$*.install_library || \
|
||||||
@@ -523,8 +523,8 @@ lib%.install_split_grades:
|
|||||||
mkdir tmp_dir && \
|
mkdir tmp_dir && \
|
||||||
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv $($*.mihs) \
|
{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv $($*.mihs) \
|
||||||
$($*.dirs) *.a *.so tmp_dir || true; } && \
|
$($*.dirs) *.a *.so tmp_dir || true; } && \
|
||||||
for grade in x $(ALL_LIBGRADES); do \
|
for grade in $(ALL_LIBGRADES); do \
|
||||||
if [ "$$grade" != "x" ]; then \
|
if [ "$$grade" != "$(GRADE)" ]; then \
|
||||||
$(MMAKE) GRADE=$$grade $*.depend || \
|
$(MMAKE) GRADE=$$grade $*.depend || \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
$(MMAKE) GRADE=$$grade lib$*.install_split_library || \
|
$(MMAKE) GRADE=$$grade lib$*.install_split_library || \
|
||||||
|
|||||||
@@ -343,7 +343,6 @@ EXTRA_RANLIBFLAGS =
|
|||||||
|
|
||||||
# List of grades to install for a library
|
# List of grades to install for a library
|
||||||
ALL_LIBGRADES = $(TARGET_LIBGRADES) $(EXTRA_TARGET_LIBGRADES)
|
ALL_LIBGRADES = $(TARGET_LIBGRADES) $(EXTRA_TARGET_LIBGRADES)
|
||||||
LIBGRADES =
|
|
||||||
EXTRA_LIBGRADES =
|
EXTRA_LIBGRADES =
|
||||||
|
|
||||||
# $(CFLAGS_FOR_PIC) is passed to the C compiler when creating `.pic_o' files
|
# $(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@
|
LIBGRADES = @LIBGRADES@
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
||||||
|
|||||||
Reference in New Issue
Block a user