diff --git a/Makefile.am b/Makefile.am index 3a1de77..4ca6c5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,3 +72,12 @@ noinst_PROGRAMS = tocktest clean-local: rm -f obj/*.o obj/*.hi rmdir obj + +get-cgtests: + svn co https://subversion.frmb.org/pubsvn/cgtests/branches/tock cgtests + +make-cgtests-c: get-cgtests + ./compile-cgtests --backend=c + +make-cgtests-cpp: get-cgtests + ./compile-cgtests --backend=cppcsp diff --git a/compile-cgtests b/compile-cgtests new file mode 100644 index 0000000..151876d --- /dev/null +++ b/compile-cgtests @@ -0,0 +1,7 @@ +#! /bin/sh + +for t in cgtests/cgtest??.occ +do + echo "Compiling " $t + ./tock --output=${t%%.occ} $@ $t +done diff --git a/configure.ac b/configure.ac index d76ebc2..42fc866 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ if test "x$ac_cv_prog_cc_c99" = "xno"; then ccsp_kroc_available=false fi -#Check that they have alex, GHC, kroc, and the CCSP headers: +#Check that they have alex, GHC, kroc, svn and the CCSP headers: AC_CHECK_PROG([HAVE_GHC],[ghc],[true],[false]) if test "x$HAVE_GHC" = "xfalse"; then AC_MSG_ERROR([ghc not found]) @@ -38,6 +38,13 @@ if test "x$HAVE_KROC" = "xfalse"; then ccsp_kroc_available=false fi +AC_CHECK_PROG([HAVE_SVN],[svn],[true],[false]) +if test "x$HAVE_SVN" = "xfalse"; then + AC_MSG_WARN([svn (Subversion) not found; you will not be able to fetch the occam cgtests from the public repository]) +fi + +#TODO test that they have the right GHC libraries installed (such as hunit, mtl) + AC_LANG(C) AC_CHECK_HEADER([cifccsp.h],[HAVE_CIFCCSP=true],[HAVE_CIFCCSP=false])