Files
mercury/extras/morphine/scripts/exec_mercury_program
Erwan Jahier 64ab913835 Replace occurrences of "INSA" by "INSA de Rennes" since Morphine is an "INSA de
Estimated hours taken: 1

Replace occurrences of "INSA" by "INSA de Rennes" since Morphine is an "INSA de
Rennes" software, not an "INSA" one.


*:
*/*:
	/s/INSA/INSA de Rennes/

scripts/exec_mercury_program:
	Remove some useless I/O wrapping of Mercury execution runs.

source/collect.op:
	Improve a litte bit the documentation of collect/2.
1999-12-20 14:44:17 +00:00

54 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# Copyright (C) 1999 INRIA/INSA de Rennes.
#
# Author : Erwan Jahier <jahier@irisa.fr>
#
# 1st argument is the socket address (unix) or the port name (inet),
# 2nd argument is the socket domain (unix or inet),
# 3rd argument is name of the machine to run the mercury program on,
# 4th argument is the name of the program being called,
# the following arguments are the arguments of the program being called.
SOCKETDOMAIN=$2
REMOTEMACHINE=$3
LOCALMACHINE=`uname -n`
case $SOCKETDOMAIN in
unix) MERCURY_DEBUGGER_UNIX_SOCKET=$1
MERCURY_OPTIONS="$MERCURY_OPTIONS -De"
export MERCURY_DEBUGGER_UNIX_SOCKET
export MERCURY_OPTIONS
shift 3
$@
;;
inet) HOSTADDR=`ypcat hosts|grep $LOCALMACHINE|awk '{printf "%s\n", $1}'|sort -u`
# XXX How can I retrieve the host address without this horrible
# hack?
# That don't even work on machines that have not got ypcat...
# Note it is not a big deal since it is only needed if people
# want to use internet sockets and there is no reason why people
# would want those. (except if they don't have eclipse 4.1).
MERCURY_DEBUGGER_INET_SOCKET="$HOSTADDR $1"
MERCURY_OPTIONS="$MERCURY_OPTIONS -De"
export MERCURY_DEBUGGER_INET_SOCKET
export MERCURY_OPTIONS
shift 3
case $REMOTEMACHINE in
local) $@ ;;
# XXX Remote debugging does not work yet.
*) rsh $REMOTEMACHINE $@;;
esac
;;
*) echo "error in exec_mercury_program"
echo "SOCKETDOMAIN should be set to unix or inet"
;;
esac