File: api-ocaml

package info (click to toggle)
morsmall 0.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: ml: 1,327; makefile: 32; sh: 19
file content (25 lines) | stat: -rwxr-xr-x 688 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

set -e

indir=${PWD}/debian/tests
outdir=${ADT_ARTIFACTS-/tmp/morsmall-package-test}/ocaml-api
mkdir -p ${outdir}
cd ${outdir}
cp ${indir}/parse_and_print.ml ${indir}/_tags ${indir}/helloworld.sh .

echo "* Compile to bytecode."
ocamlbuild -use-ocamlfind parse_and_print.byte
echo "* Run the bytecode."
./parse_and_print.byte helloworld.sh > helloworld.byte.out
diff helloworld.sh helloworld.byte.out

if [ -x /usr/bin/ocamlopt ]; then
    echo "* Compile to native code."
    ocamlbuild -use-ocamlfind parse_and_print.native
    echo "* Run the native code."
    ./parse_and_print.native helloworld.sh > helloworld.native.out
    diff helloworld.sh helloworld.native.out
fi