Files
mercury/scripts/ml.sh
Fergus Henderson 7e5d4c2d89 Moved these scripts from the code directory to the scripts directory.
mgnuc.sh mod2c mod2init.sh:
	Moved these scripts from the code directory to the scripts directory.
	Changed mgnuc to use the MERCURY_C_INCL_DIR environment variable.
	Changed mod2init to use MERCURY_MOD_LIB_DIR and MERCURY_MOD_LIB_MODS.
	Changed ml to use MERCURY_C_LIB_DIR rather than MERCURY_CLIB_DIR.
1995-02-02 05:57:16 +00:00

30 lines
589 B
Bash

#!/bin/sh
LIBDIR=${MERCURY_C_LIB_DIR:-@LIBDIR@/lib}
GRADE=none
case "$1" in
-s*)
GRADE=` expr $1 : '-s\(.*\)' `
shift ;;
esac
# The following will pick up both the .a and the .so
# if they both exist (i.e. on systems which support shared libraries).
# Otherwise it will just pick up the .a file.
LIBDIR_OPTS="$LIBDIR/$GRADE/@FULLARCH@/libmer.*"
case "`hostname`" in
cadillac.dd.citri.edu.au)
GCC=/usr/local/bin/gcc ;;
kryten.cs.mu.OZ.AU)
GCC=/usr/local/bin/gcc ;;
kryten.cs.mu.OZ.AU)
GCC=/usr/local/gcc/bin/gcc ;;
*)
GCC=${GCC:-gcc}
esac
exec $GCC "$@" $LIBDIR_OPTS