[m-rev.] for review: Fix #203: installing to temporary location with DESTDIR.
Peter Wang
novalazy at gmail.com
Mon Mar 18 14:27:27 AEDT 2013
On Mon, 18 Mar 2013 13:05:27 +1100, Peter Wang <novalazy at gmail.com> wrote:
> diff --git a/Mmakefile b/Mmakefile
> index 8e3f6bf..a13a920 100644
> --- a/Mmakefile
> +++ b/Mmakefile
> @@ -613,7 +613,11 @@ install_deep_profiler: deep_profiler
> ifeq ($(CROSS_COMPILING),yes)
> OVERRIDE_MC_FOR_LIBGRADE =
> else
> -OVERRIDE_MC_FOR_LIBGRADE = MC=mmc
> + # We must override the paths in the mmc script in case the compiler was
> + # installed to a temporary location, using DESTDIR.
> +OVERRIDE_MC_FOR_LIBGRADE = MC=mmc \
> + MERCURY_COMPILER=$(INSTALL_PREFIX)/bin/mercury_compile \
> + MERCURY_CONFIG_DIR=$(INSTALL_PREFIX)/lib/mercury
> endif
Same but better:
@@ -613,7 +613,11 @@ install_deep_profiler: deep_profiler
ifeq ($(CROSS_COMPILING),yes)
OVERRIDE_MC_FOR_LIBGRADE =
else
-OVERRIDE_MC_FOR_LIBGRADE = MC=mmc
+ # We must override the paths in the mmc script in case the compiler was
+ # installed to a temporary location, using DESTDIR.
+OVERRIDE_MC_FOR_LIBGRADE = MC=mmc \
+ MERCURY_COMPILER=$(INSTALL_BINDIR)/mercury_compile \
+ MERCURY_CONFIG_DIR=$(INSTALL_LIBDIR)
endif
.PHONY: install_grades
More information about the reviews
mailing list