[mercury-users] Re: [m-dev.] Installation + re-installation

Peter Ross peter.ross at miscrit.be
Thu Sep 7 20:36:11 AEDT 2000


On Thu, Sep 07, 2000 at 02:13:13AM -0700, Ralph Becket wrote:
> Second, and I know I've asked this one before and I've forgotten the
> answer *again*, what's the fastest, most painless way to test a
> change made to, say, list.m?  Whenever I make such a change, with
> the intention of contributing something to the library, I go back
> to the library source tree and try `mmake install'.  Invariably, I
> get no end of hassle - odd linking errors, int files not being
> installed, you name it.  Can someone tell me what the exact recipe
> is for this sort of thing?
> 
I have attached two shell scripts which set all the necessary
environment variables to use a development copy of the compiler to
compile a program.

All you need to do is set the WORKSPACE environment variable.

Pete

PS. I moved this to mercury-users because I thought some users might
find this useful for contributing changes to the libraries as well.
-------------- next part --------------
#!/bin/sh
#set -x

MERCURY_COMPILER=$WORKSPACE/compiler/mercury_compile

export MERCURY_COMPILER
if [ -d $WORKSPACE/library/Mercury ]; then
    MMAKE_USE_SUBDIRS=yes
    export MMAKE_USE_SUBDIRS
fi

MERCURY_INT_DIR=$WORKSPACE/library
export MERCURY_INT_DIR

MERCURY_LIBS="$WORKSPACE/trace/libmer_trace.a $WORKSPACE/browser/libmer_browser.a $WORKSPACE/library/libmer_std.a $WORKSPACE/runtime/libmer_rt.a $WORKSPACE/boehm_gc/libgc.a -lm"
export MERCURY_LIBS

MERCURY_ALL_C_INCL_DIRS="-I$WORKSPACE/runtime -I$WORKSPACE/trace -I$WORKSPACE/boehm_gc -I$WORKSPACE/boehm_gc/include -I $WORKSPACE/library"
export MERCURY_ALL_C_INCL_DIRS

MMAKE_DIR=$WORKSPACE/scripts
export MMAKE_DIR

MERCURY_MOD_LIB_MODS="$WORKSPACE/browser/mer_browser.init $WORKSPACE/library/mer_std.init $WORKSPACE/runtime/mer_rt.init"
export MERCURY_MOD_LIB_MODS

PATH="$WORKSPACE/scripts:$WORKSPACE/util:$PATH"
export PATH
mmake "$@"
-------------- next part --------------
#!/bin/sh
MERCURY_COMPILER=$WORKSPACE/compiler/mercury_compile
export MERCURY_COMPILER

MERCURY_INT_DIR=$WORKSPACE/library
export MERCURY_INT_DIR

MERCURY_LIBS="$WORKSPACE/trace/libmer_trace.a $WORKSPACE/browser/libmer_browser.a $WORKSPACE/library/libmer_std.a $WORKSPACE/runtime/libmer_rt.a $WORKSPACE/boehm_gc/libgc.a -lm"
export MERCURY_LIBS

MERCURY_ALL_MC_C_INCL_DIRS="--c-include-directory $WORKSPACE/runtime --c-include-directory $WORKSPACE/trace --c-include-directory $WORKSPACE/boehm_gc --c-include-directory $WORKSPACE/boehm_gc/include --c-include-directory $WORKSPACE/library"
export MERCURY_ALL_MC_C_INCL_DIRS

MMAKE_DIR=$WORKSPACE/scripts
export MMAKE_DIR

MERCURY_MOD_LIB_MODS="$WORKSPACE/browser/mer_browser.init $WORKSPACE/library/mer_std.init $WORKSPACE/runtime/mer_rt.init"
export MERCURY_MOD_LIB_MODS

PATH="$WORKSPACE/scripts:$WORKSPACE/util:$PATH"
export PATH

mmc "$@"


More information about the users mailing list