File: hmake-config.inst

package info (click to toggle)
hmake 3.14-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,776 kB
  • ctags: 78
  • sloc: haskell: 3,630; sh: 1,254; makefile: 389; ansic: 19
file content (42 lines) | stat: -rw-r--r-- 1,105 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
# hmake-config - adjust the configuration of hmake
# Author: Malcolm Wallace, 2002, Malcolm.Wallace@cs.york.ac.uk 

INSTALLVER="InstallVer"
SCRIPTDIR=${SCRIPTDIR-ScriptDir}
MACHINE=${MACHINE-"`$SCRIPTDIR/harch`"}
HMAKEDIR=${HMAKEDIR-ExecutableDir}
HMAKECONFDIR=${HMAKECONFDIR-ConfDir}
TMP=${TMP-/tmp}
export MACHINE HMAKEDIR HMAKECONFDIR

if [ ! -d $HMAKEDIR/$MACHINE ]
then
  echo "`basename $0` is not installed/configured for $MACHINE."
  echo "  See your system administrator, or install it yourself from"
  echo "  http://www.cs.york.ac.uk/fp/hmake/"
  exit 1
fi

usage() {
  echo "Usage: `basename $0` [config-file] new"
  echo "       `basename $0` [config-file] list [compiler]"
  echo "       `basename $0` [config-file] [add|delete|default] [compiler]"
  exit 0
}

case $1 in
  --version) echo "$0: $INSTALLVER"
             exit 0;;
  --help)    usage ;;
esac

map() { f=$1; shift; for item in $*; do $f $item; done; }
cygfix() { cygpath -w $1 | tr '\\' '/'; }

case $MACHINE in
  ix86-CYGWIN*) ARGS=`map cygfix "$@"` ;;
  *) ARGS="$@" ;;
esac

exec $HMAKEDIR/$MACHINE/MkConfig $ARGS