[m-rev.] for review: make erlang grade easier to install
Peter Wang
novalazy at gmail.com
Tue Jun 9 13:17:00 AEST 2009
[spaces ignored so alignment looks funny]
Branches: main
Mmakefile:
Make install target automatically use `mmc --make' to build and install
the erlang grade.
Delete an unused variable.
README.Erlang:
Update installation procedure.
diff --git a/Mmakefile b/Mmakefile
index d889b3e..9ed986a 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -607,11 +607,18 @@ install_grades: all
# Compile different grades in different directories, so that we can
# optionally preserve all the directories, and include them in
# a distribution.
+ #
+ # Force mmc --make for grades which require it.
+for grade in x $(LIBGRADES); do \
- if [ "$${grade}" != "x" -a "$${grade}" != "$(GRADE)" ]; then \
+ if [ "$${grade}" = "x" -o "$${grade}" = "$(GRADE)" ]; then \
+ continue; \
+ fi; \
gc_grade=`scripts/ml --grade $${grade} --print-gc-grade`; \
IWS=`/bin/pwd`/install_grade_dir.$${grade}; \
- tmpdirs="$$t{mpdirs} $${IWS}"; \
+ ( \
+ if [ "$${grade}" = "erlang" ]; then \
+ MMAKE_USE_MMC_MAKE=yes; \
+ fi; \
scripts/prepare_install_dir $${IWS} && \
( cd $${IWS}/boehm_gc && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
@@ -642,11 +649,11 @@ install_grades: all
( cd $${IWS}/trace && \
$(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
install_lib ) && \
- true || \
+ true \
+ ) || \
{ echo "To clean up from failed install, remove $${IWS}"; \
exit 1; }; \
if test ! -f .leave_tmp_dir; then rm -fr $${IWS}; fi; \
- fi; \
done;
#-----------------------------------------------------------------------------#
diff --git a/README.Erlang b/README.Erlang
index 0998a83..3012ca2 100644
--- a/README.Erlang
+++ b/README.Erlang
@@ -41,11 +41,6 @@ Please note that the Erlang backend is still an
experimental feature.
INSTALLATION
-The Mercury compiler itself can be installed with Erlang support as
-usual, but the standard library can currently only be built for the
-Erlang using `mmc --make'. Therefore you must already have an
-installed Mercury compiler available.
-
Invoke configure with the option `--enable-erlang-grade' in order to
enable Erlang support. Make sure it was detected properly by running:
@@ -53,9 +48,9 @@ enable Erlang support. Make sure it was detected
properly by running:
Then run:
- mmake --use-mmc-make install
+ mmake install
or
- mmake --use-mmc-make install LIBGRADES=erlang
+ mmake install LIBGRADES=erlang
For better performance you will need to add the following line to
Mmake.params before installing:
@@ -72,8 +67,8 @@ The erlang grade is enabled by using any of the options
in combination with `mmc --make'. Mmake does _not_ currently support
the erlang grade.
-To run a Mercury program using the erlang grade, you need to build the
-Mercury library in the erlang grade, using the Mercury source distribution.
+To run a Mercury program using the erlang grade, you need to install the
+Mercury library in the erlang grade, as described above.
You can now build programs such as hello.m or calculator.m in the samples
directory.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list