[m-dev.] for review: lmc

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Jan 15 14:00:20 AEDT 2001


tools/lmc:
	A shell script to allow you to execute a version of the Mercury
	compiler that you have built in a workspace. Everything that the
	compilation process needs will come from that workspace: the libraries
	for the runtime system, the trace system, the Mercury standard library,
	the Boehm collector, etc.

Zoltan.

#!/bin/sh
#
# This shell script allows you to execute a version of the Mercury compiler
# that you have built in a workspace. Everything that the compilation process
# needs will come from that workspace: the libraries for the runtime system,
# the trace system, the Mercury standard library, the Boehm collector, etc.
# You specify the directory containing the workspace by setting the value of
# the WORKSPACE environment variable. This can be done by setting up a small
# shell script for each workspace you have:
#
# #!/bin/sh
# WORKSPACE=$HOME/mer/ws1
# export WORKSPACE
# $HOME/bin/scripts/lmc "$@"
#
# This of course assumes that your copy of this script resides in
# $HOME/bin/scripts.
#
# If you want to track down some low level bug, you can ask this script to
# execute the Mercury compiler under gdb by setting the environment variable
# MMC_UNDER_GDB to the string "true".

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_C_INCL_DIRS="-I$WORKSPACE/runtime -I$WORKSPACE/trace -I$WORKSPACE/boehm_gc -I$WORKSPACE/boehm_gc/include"
export MERCURY_ALL_C_INCL_DIRS
MMAKE_DIR=$WORKSPACE/scripts
export MMAKE_DIR
MERCURY_TRACE_LIB_MODS="$WORKSPACE/browser/mer_browser.init"
export MERCURY_TRACE_LIB_MODS
MERCURY_MOD_LIB_MODS="$WORKSPACE/library/mer_std.init $WORKSPACE/runtime/mer_rt.init"
export MERCURY_MOD_LIB_MODS
PATH="$WORKSPACE/scripts:$WORKSPACE/util:$PATH"
export PATH
if test "$MMC_UNDER_GDB" = true
then
	echo --link-flags "-g" --cflags "-g" --cflags "-I$WORKSPACE/trace" --cflags "-I$WORKSPACE/runtime" --cflags "-I$WORKSPACE/boehm_gc" --cflags "-I$WORKSPACE/boehm_gc/include" "$@"
	gdb $MERCURY_COMPILER
else
	mmc --link-flags "-g" --cflags "-g" --cflags "-g" --cflags "-I$WORKSPACE/trace" --cflags "-I$WORKSPACE/runtime" --cflags "-I$WORKSPACE/boehm_gc" --cflags "-I$WORKSPACE/boehm_gc/include" "$@"
fi
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list