mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 21:35:49 +00:00
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.
30 lines
589 B
Bash
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
|