pkgsrc/lang/ocaml/files/wrapper.sh
adrianp da24824e10 - Update from 3.06 to 3.08.2
- Lots of changes/bugfixes - see Changes for all the details
2005-02-04 21:35:51 +00:00

21 lines
352 B
Bash

#!@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} "$@"