File: test.sh.in

package info (click to toggle)
anthy 6300d-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,400 kB
  • ctags: 2,270
  • sloc: ansic: 17,009; sh: 13,554; lisp: 1,039; makefile: 252; ruby: 212; perl: 10
file content (42 lines) | stat: -rwxr-xr-x 643 bytes parent folder | download
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

# Generate ruby module
#
# [usage]
#  *compile module
#   test.sh -compile
#  *invoke script
#   test.sh
#

srcdir=@SRCDIR@

if test x$srcdir == x. ;then
  testdir=.
  confdir=..
else
  testdir=${srcdir}/test/
  confdir=${testdir}
fi

case x$1 in
xcomp | xcompile | x-comp | x-compile | x--compile)
  swig -ruby -I${testdir} anthy_swig.i

  # do not over write Makefile
  if test ! -d work; then
    mkdir work
  fi
  (cd work; ruby ${confdir}/extconf.rb)
  make -f work/Makefile
  exit;;
  *)
esac

LD_LIBRARY_PATH=../src-diclib/.libs:../src-main/.libs
export LD_LIBRARY_PATH

SRCDIR=$srcdir
export SRCDIR

ruby ${testdir}/test.rb