summaryrefslogtreecommitdiff
path: root/lang/ocaml/files/wrapper.sh
blob: 7eac0758ad399cf40d89817fe25078aebafaa666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!@SH@

# $NetBSD: wrapper.sh,v 1.2 2005/02/04 21:35:51 adrianp Exp $

BINDIR='@OCAML_PREFIX@'
CFLAGS='@CFLAGS@'
LDFLAGS='@LDFLAGS@'

if echo "$@" | grep ' -c ' >/dev/null
then
	flags="${CFLAGS}"
else
	flags="${CFLAGS} ${LDFLAGS}"
fi

for f in ${flags}
do
	MLFLAGS="${MLFLAGS} -ccopt ${f}"
done

exec "@OCAML_PREFIX@/bin/`basename $0`" ${MLFLAGS} "$@"