PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/ocaml/makedebugtop

#
Shell | 21 lines | 12 code | 2 blank | 7 comment | 1 complexity | da4f05ee6d1382f3a0534943c7a95467 MD5 | raw file
 1#!/bin/sh
 2#
 3# Usage: makedebugtop test_name.c[pp]test
 4#
 5# Creates an ocaml toplevel for debugging based on a .cpptest or .ctest
 6# file.
 7#
 8
 9OCAMLINC=/usr/local/lib/ocaml
10swigtest=$1
11thetest=`echo $1 | sed -e 's/\.c[p]*test//g'`
12cppopt=""
13if echo $swigtest | grep -s cpptest ; then
14	cppopt=-xc++
15fi
16
17echo "Making the test"
18make $swigtest
19echo "Building ${thetest}_top"
20gcc -c -g $cppopt -I$OCAMLINC ${thetest}_wrap.c
21ocamlmktop -cclib -g -custom swig.cmo ${thetest}_wrap.o ${thetest}.cmo -o ${thetest}_top -cclib -lstdc++