[m-rev.] for review: Delete Erlang backend from configure.
Peter Wang
novalazy at gmail.com
Mon Oct 26 17:09:19 AEDT 2020
configure.ac:
m4/mercury.m4:
Delete --enable-erlang-grade configure option.
Don't search for erlang compiler and interpreter.
Don't substitute @ERLC@ and @ERL at .
Don't add erlang to libgrades.
Don't generate erlang_conf.hrl
library/erlang_conf.hrl.in:
Delete template file.
.dockerignore:
browser/MDB_FLAGS.in:
compiler/COMP_FLAGS.in:
deep_profiler/DEEP_FLAGS.in:
library/.gitignore:
library/Mmakefile:
library/library.m:
mdbcomp/MDBCOMP_FLAGS.in:
mfilterjavac/MFILTERJAVAC_FLAGS.in:
profiler/PROF_FLAGS.in:
scripts/Mercury.config.bootstrap.in:
scripts/mercury_config.in:
scripts/prepare_install_dir.in:
ssdb/SSDB_FLAGS.in:
tools/bootcheck:
Delete references to Erlang .hrl files.
Delete references to @ERLC@ and @ERL at .
---
.dockerignore | 1 -
browser/MDB_FLAGS.in | 2 -
compiler/COMP_FLAGS.in | 3 --
configure.ac | 21 ----------
deep_profiler/DEEP_FLAGS.in | 1 -
library/.gitignore | 1 -
library/Mmakefile | 1 -
library/erlang_conf.hrl.in | 26 -------------
library/library.m | 7 ----
m4/mercury.m4 | 59 -----------------------------
mdbcomp/MDBCOMP_FLAGS.in | 1 -
mfilterjavac/MFILTERJAVAC_FLAGS.in | 1 -
profiler/PROF_FLAGS.in | 1 -
scripts/Mercury.config.bootstrap.in | 4 +-
scripts/Mercury.config.in | 4 +-
scripts/mercury_config.in | 1 -
scripts/prepare_install_dir.in | 1 -
ssdb/SSDB_FLAGS.in | 3 --
tools/bootcheck | 2 -
19 files changed, 4 insertions(+), 136 deletions(-)
delete mode 100644 library/erlang_conf.hrl.in
diff --git a/.dockerignore b/.dockerignore
index 9f9294a95..953f79dc8 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -25,7 +25,6 @@ configure.log
*.date0
*.date3
*.dll
-erlang_conf.hrl
*.err
*.exe
/.git/*
diff --git a/browser/MDB_FLAGS.in b/browser/MDB_FLAGS.in
index 42855b842..eb651fdb5 100644
--- a/browser/MDB_FLAGS.in
+++ b/browser/MDB_FLAGS.in
@@ -29,8 +29,6 @@
--c-include-directory ../mdbcomp/Mercury/mihs
--csharp-flag -keyfile:../mercury.snk
@CSHARP_DELAYSIGN_FLAG@
---erlang-include-directory ../library/Mercury/hrls
---erlang-include-directory ../mdbcomp/Mercury/hrls
-L../boehm_gc
-L../runtime
-L../library
diff --git a/compiler/COMP_FLAGS.in b/compiler/COMP_FLAGS.in
index d6819f78b..ebe8f3c23 100644
--- a/compiler/COMP_FLAGS.in
+++ b/compiler/COMP_FLAGS.in
@@ -29,9 +29,6 @@
--c-include-directory ../ssdb/Mercury/mihs
--c-include-directory ../trace
--csharp-flag -keyfile:../mercury.snk
---erlang-include-directory ../library/Mercury/hrls
---erlang-include-directory ../mdbcomp/Mercury/hrls
---erlang-include-directory ../ssdb/Mercury/hrls
--no-java-classpath
--java-classpath ../library/mer_rt.jar
--java-classpath ../library/mer_std.jar
diff --git a/configure.ac b/configure.ac
index 6456d909a..e88692ce1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -473,7 +473,6 @@ then
:- type x ---> x.
:- pragma foreign_type("C", x, "MR_Integer",
[[can_pass_as_mercury_type, stable]]).
- :- pragma foreign_type("Erlang", x, "").
:- pragma foreign_type("C#", x, "object").
:- pragma foreign_proc("C", return_rtti_version(Version::out),
@@ -1353,12 +1352,6 @@ esac
AC_SUBST(JAVAC_FLAGS_FOR_HEAP_SIZE_MMAKE)
AC_SUBST(JAVAC_FLAGS_FOR_HEAP_SIZE_CONFIG)
-#-----------------------------------------------------------------------------#
-# Erlang configuration
-#
-
-MERCURY_CHECK_ERLANG
-
#-----------------------------------------------------------------------------#
mercury_check_for_functions () {
@@ -3464,12 +3457,6 @@ AC_ARG_ENABLE(java-grade,
AC_HELP_STRING([--disable-java-grade], [do not install the Java grade]),
enable_java_grade="$enableval",enable_java_grade=yes)
-# We don't enable the Erlang grades by default because it is still
-# experimental.
-AC_ARG_ENABLE(erlang-grade,
- AC_HELP_STRING([--enable-erlang-grade], [install the Erlang grade]),
- enable_erlang_grade="$enableval",enable_erlang_grade=no)
-
AC_ARG_ENABLE(libgrades,
AC_HELP_STRING([--enable-libgrades=...],
[install exactly the given versions of the library.
@@ -3501,7 +3488,6 @@ if test "$enable_most_grades" = no; then
enable_stseg_grades=no
enable_csharp_grade=no
enable_java_grade=no
- enable_erlang_grade=no
fi
#-----------------------------------------------------------------------------#
@@ -3720,12 +3706,6 @@ then
LIBGRADES="$LIBGRADES java"
fi
-# Add Erlang back-end grade, if Erlang is installed.
-if test $mercury_cv_erlang = yes -a "$enable_erlang_grade" = yes
-then
- LIBGRADES="$LIBGRADES erlang"
-fi
-
# Add `.ssdebug' grades.
if test "$enable_ssdebug_grades" = yes; then
# LLDS has better debug grades available.
@@ -5393,7 +5373,6 @@ bindist/bindist.Makefile
runtime/mercury_dotnet.cs
java/runtime/Constants.java
java/runtime/Native.java
-library/erlang_conf.hrl
compiler/COMP_FLAGS
grade_lib/GRADE_LIB_FLAGS
library/LIB_FLAGS
diff --git a/deep_profiler/DEEP_FLAGS.in b/deep_profiler/DEEP_FLAGS.in
index 0c3a188a8..2894bdff1 100644
--- a/deep_profiler/DEEP_FLAGS.in
+++ b/deep_profiler/DEEP_FLAGS.in
@@ -31,5 +31,4 @@
--java-classpath ../library/mer_std.jar
--java-classpath ../browser/mer_browser.jar
--java-classpath ../mdbcomp/mer_mdbcomp.jar
---erlang-include-directory ../library/Mercury/hrls
--config-file ../scripts/Mercury.config.bootstrap
diff --git a/library/.gitignore b/library/.gitignore
index d815bcd32..31604b10f 100644
--- a/library/.gitignore
+++ b/library/.gitignore
@@ -46,7 +46,6 @@ libmer_std.so
*.jar
LIB_FLAGS
config.log
-erlang_conf.hrl
jmercury
tags
*.check.mmacros
diff --git a/library/Mmakefile b/library/Mmakefile
index ea167e73c..ca892b75d 100644
--- a/library/Mmakefile
+++ b/library/Mmakefile
@@ -519,7 +519,6 @@ realclean_local:
rm -f mr_int.class mr_float.class mr_char.class
rm -f mr_int\$$*.class mr_float\$$*.class mr_char\$$*.class
rm -f $(STD_LIB_NAME).jar $(RT_LIB_NAME).jar $(NATIVE_SO)
- rm -f erlang_conf.hrl
#-----------------------------------------------------------------------------#
diff --git a/library/erlang_conf.hrl.in b/library/erlang_conf.hrl.in
deleted file mode 100644
index a9a68c75b..000000000
--- a/library/erlang_conf.hrl.in
+++ /dev/null
@@ -1,26 +0,0 @@
-% @configure_input@
-%-----------------------------------------------------------------------------%
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
-%-----------------------------------------------------------------------------%
-% Copyright (C) 2007 The University of Melbourne.
-% Copyright (C) 2018 The Mercury team.
-% This file is distributed under the terms specified in COPYING.LIB.
-%-----------------------------------------------------------------------------%
-%
-% File: erlang_conf.hrl.in.
-%
-% At the moment this file just stores the library version for Erlang.
-%
-%-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%
-
--ifndef(MERCURY__ERLANG_CONF_HRL).
--define(MERCURY__ERLANG_CONF_HRL, 1).
-
--define(MR_VERSION, "@VERSION@").
--define(MR_FULLARCH, "@FULLARCH@").
-
--endif.
-
-%-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%
diff --git a/library/library.m b/library/library.m
index c9e95b174..5275ce6c2 100644
--- a/library/library.m
+++ b/library/library.m
@@ -192,19 +192,12 @@
:- import_module term_size_prof_builtin.
:- import_module test_bitset.
-:- pragma foreign_decl("Erlang", local, "
--include(""erlang_conf.hrl"").
-").
-
% library.version must be implemented using pragma foreign_proc,
% so we can get at the MR_VERSION and MR_FULLARCH configuration
% parameters. We can't just generate library.m from library.m.in
% at configuration time, because that would cause bootstrapping problems --
% we might not have a Mercury compiler around to compile library.m with.
-% We can't allow library.version to inlined into other modules. The Erlang
-% definition depends on erlang_conf.hrl, which will only be included by this
-% module and not installed.
:- pragma no_inline(library.version/2).
:- pragma foreign_proc("C",
diff --git a/m4/mercury.m4 b/m4/mercury.m4
index da20e8046..be72b6bca 100644
--- a/m4/mercury.m4
+++ b/m4/mercury.m4
@@ -619,65 +619,6 @@ fi
])
])
-#-----------------------------------------------------------------------------#
-#
-# Erlang configuration.
-#
-
-# copy of AC_ERLANG_PATH_ERLC from autoconf-2.60
-AC_DEFUN([MERCURY_ERLANG_PATH_ERLC],
-[AC_ARG_VAR([ERLC], [Erlang/OTP compiler command [autodetected]])dnl
-if test -n "$ERLC"; then
- AC_MSG_CHECKING([for erlc])
- AC_MSG_RESULT([$ERLC])
-else
- AC_PATH_TOOL(ERLC, erlc, [$1], [$2])
-fi
-AC_ARG_VAR([ERLCFLAGS], [Erlang/OTP compiler flags [none]])dnl
-])
-
-# copy of AC_ERLANG_PATH_ERL from autoconf-2.60
-AC_DEFUN([MERCURY_ERLANG_PATH_ERL],
-[AC_ARG_VAR([ERL], [Erlang/OTP interpreter command [autodetected]])dnl
-if test -n "$ERL"; then
- AC_MSG_CHECKING([for erl])
- AC_MSG_RESULT([$ERL])
-else
- AC_PATH_TOOL(ERL, erl, [$1], [$2])[]dnl
-fi
-])
-
-AC_DEFUN([MERCURY_CHECK_ERLANG],
-[
-MERCURY_ERLANG_PATH_ERLC
-MERCURY_ERLANG_PATH_ERL
-
-if test "$ERLC" != "" -a "$ERL" != ""; then
- mercury_cv_erlang="yes"
-else
- mercury_cv_erlang="no"
-fi
-
-# On Windows, Erlang/OTP has a high chance of being installed in a path
-# containing spaces. The simplest solution is to keep only the basename.
-# Everything will still work so long as the executables can be found
-# on the PATH later.
-case "$ERLC" in
- *" "*)
- ERLC=`basename "$ERLC"`
- ;;
-esac
-
-case "$ERL" in
- *" "*)
- ERL=`basename "$ERL"`
- ;;
-esac
-
-AC_SUBST([ERLC])
-AC_SUBST([ERL])
-])
-
#-----------------------------------------------------------------------------#
# NOTE: updates to this macro may need to be reflected in compiler/globals.m.
diff --git a/mdbcomp/MDBCOMP_FLAGS.in b/mdbcomp/MDBCOMP_FLAGS.in
index 7f422348f..b61fd0719 100644
--- a/mdbcomp/MDBCOMP_FLAGS.in
+++ b/mdbcomp/MDBCOMP_FLAGS.in
@@ -24,7 +24,6 @@
--c-include-directory ../library/Mercury/mihs
--csharp-flag -keyfile:../mercury.snk
@CSHARP_DELAYSIGN_FLAG@
---erlang-include-directory ../library/Mercury/hrls
-L../boehm_gc
-L../runtime
-L../library
diff --git a/mfilterjavac/MFILTERJAVAC_FLAGS.in b/mfilterjavac/MFILTERJAVAC_FLAGS.in
index a885f5e91..e043dfd90 100644
--- a/mfilterjavac/MFILTERJAVAC_FLAGS.in
+++ b/mfilterjavac/MFILTERJAVAC_FLAGS.in
@@ -30,5 +30,4 @@
--java-classpath ../library/mer_std.jar
--java-classpath ../browser/mer_browser.jar
--java-classpath ../mdbcomp/mer_mdbcomp.jar
---erlang-include-directory ../library/Mercury/hrls
--config-file ../scripts/Mercury.config.bootstrap
diff --git a/profiler/PROF_FLAGS.in b/profiler/PROF_FLAGS.in
index 6d6f39eb7..fabc6aa58 100644
--- a/profiler/PROF_FLAGS.in
+++ b/profiler/PROF_FLAGS.in
@@ -32,5 +32,4 @@
--no-java-classpath
--java-classpath ../library/mer_rt.jar
--java-classpath ../library/mer_std.jar
---erlang-include-directory ../library/Mercury/hrls
--config-file ../scripts/Mercury.config.bootstrap
diff --git a/scripts/Mercury.config.bootstrap.in b/scripts/Mercury.config.bootstrap.in
index f0d7fc2b0..3a36dd1f9 100644
--- a/scripts/Mercury.config.bootstrap.in
+++ b/scripts/Mercury.config.bootstrap.in
@@ -35,8 +35,8 @@ MERCURY_JAVA_INTERPRETER=@JAVA_INTERPRETER@
MERCURY_CSHARP_COMPILER=@CSC@
MERCURY_CSHARP_COMPILER_TYPE=@CSHARP_COMPILER_TYPE@
MERCURY_CLI_INTERPRETER=@CLI_INTERPRETER@
-MERCURY_ERLANG_COMPILER=@ERLC@
-MERCURY_ERLANG_INTERPRETER=@ERL@
+MERCURY_ERLANG_COMPILER=
+MERCURY_ERLANG_INTERPRETER=
MERCURY_TARGET_ARCH=@FULLARCH@
# $(MATH_LIB) needs to be defined because it may
# be used by the substitution for SHARED_LIBS.
diff --git a/scripts/Mercury.config.in b/scripts/Mercury.config.in
index 71dea33b8..e63ead651 100644
--- a/scripts/Mercury.config.in
+++ b/scripts/Mercury.config.in
@@ -34,8 +34,8 @@ MERCURY_JAVA_INTERPRETER=@JAVA_INTERPRETER@
MERCURY_CSHARP_COMPILER=@CSC@
MERCURY_CSHARP_COMPILER_TYPE=@CSHARP_COMPILER_TYPE@
MERCURY_CLI_INTERPRETER=@CLI_INTERPRETER@
-MERCURY_ERLANG_COMPILER=@ERLC@
-MERCURY_ERLANG_INTERPRETER=@ERL@
+MERCURY_ERLANG_COMPILER=
+MERCURY_ERLANG_INTERPRETER=
MERCURY_TARGET_ARCH=@FULLARCH@
# $(MATH_LIB) needs to be defined because it may
# be used by the substitution for SHARED_LIBS.
diff --git a/scripts/mercury_config.in b/scripts/mercury_config.in
index b7ba4670a..81abea701 100644
--- a/scripts/mercury_config.in
+++ b/scripts/mercury_config.in
@@ -165,7 +165,6 @@ mkdir $TMPDIR/grade_lib || exit 1
touch $TMPDIR/grade_lib/GRADE_LIB_FLAGS.in || exit 1
mkdir $TMPDIR/library || exit 1
touch $TMPDIR/library/LIB_FLAGS.in || exit 1
-touch $TMPDIR/library/erlang_conf.hrl.in || exit 1
mkdir $TMPDIR/mdbcomp || exit 1
touch $TMPDIR/mdbcomp/MDBCOMP_FLAGS.in || exit 1
mkdir $TMPDIR/browser || exit 1
diff --git a/scripts/prepare_install_dir.in b/scripts/prepare_install_dir.in
index 52c4738fc..8369a8863 100644
--- a/scripts/prepare_install_dir.in
+++ b/scripts/prepare_install_dir.in
@@ -83,7 +83,6 @@ cp library/*FLAGS* ${installdir}/library
cp library/print_extra_inits ${installdir}/library
cp library/library_strong_name.sn ${installdir}/library
cp library/*.m ${installdir}/library
-cp library/*.hrl ${installdir}/library
mkdir ${installdir}/mdbcomp
cp mdbcomp/Mmake* ${installdir}/mdbcomp
cp mdbcomp/Mercury.* ${installdir}/mdbcomp
diff --git a/ssdb/SSDB_FLAGS.in b/ssdb/SSDB_FLAGS.in
index 420e9da39..8e06b8be0 100644
--- a/ssdb/SSDB_FLAGS.in
+++ b/ssdb/SSDB_FLAGS.in
@@ -31,9 +31,6 @@
--c-include-directory ../browser/Mercury/mihs
--csharp-flag -keyfile:../mercury.snk
@CSHARP_DELAYSIGN_FLAG@
---erlang-include-directory ../library/Mercury/hrls
---erlang-include-directory ../mdbcomp/Mercury/hrls
---erlang-include-directory ../browser/Mercury/hrls
-L../boehm_gc
-L../runtime
-L../library
diff --git a/tools/bootcheck b/tools/bootcheck
index 2d2eae95e..37aca876d 100755
--- a/tools/bootcheck
+++ b/tools/bootcheck
@@ -792,7 +792,6 @@ then
cd library
${LN_S} ${root}/library/[a-l]*.m .
${LN_S} ${root}/library/[m-z]*.m .
- ${LN_S} ${root}/library/*.hrl .
# See comment below for why we use ${LN} rather than ${LN_S} here
${LN} ${root}/library/library_strong_name.sn .
${LN_S} ${root}/library/print_extra_inits .
@@ -1441,7 +1440,6 @@ EOF
cd library
${LN_S} ${root}/library/[a-l]*.m .
${LN_S} ${root}/library/[m-z]*.m .
- ${LN_S} ${root}/library/*.hrl .
${LN_S} ${root}/library/print_extra_inits .
${LN_S} ${root}/library/library_strong_name.sn .
${LN_S} ${root}/library/MODULES_DOC .
--
2.28.0
More information about the reviews
mailing list