[m-rev.] for review: Fix #203: installing to temporary location with DESTDIR.

Paul Bone paul at bone.id.au
Mon Mar 18 14:39:39 AEDT 2013


On Mon, Mar 18, 2013 at 02:27:27PM +1100, Peter Wang wrote:
> 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

My planned soloution was going to be different (and take longer to
implement).  Your solution is best in the short term, so I'm happy for it to
be committed.

In the long term I'd like to build the various library grades as part of the
'all' target in the makefile, rather than the install step.

-- 
Paul Bone
http://www.bone.id.au



More information about the reviews mailing list