summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac16
-rw-r--r--test/Makefile.am2
-rw-r--r--test/colm.d/Makefile.am4
-rw-r--r--test/colm.d/gentests.sh6
-rw-r--r--test/ragel.d/Makefile.am1
-rw-r--r--test/ragel.d/gentests.sh32
6 files changed, 36 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index d091832d..16036280 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,14 @@ dnl AM_CONDITIONAL([BUILD_MANUAL], [test "x$build_manual" = "xyes"])
AC_CANONICAL_HOST()
AM_CONDITIONAL([LINKER_NO_UNDEFINED], [test "x$host_os" = "xlinux-gnu"])
+AC_ARG_WITH(crack,
+ [AC_HELP_STRING([--with-crack], [location of crack install])],
+ [CRACK_BIN="$withval/bin/crack"],
+ [AC_ERROR(["require --with-crack"])]
+)
+
+AC_SUBST(CRACK_BIN)
+
COLM='$(top_srcdir)/colm/colm'
COLM_LD='$(top_srcdir)/colm/libcolm.la'
COLM_LIBDEP=$COLM_LD
@@ -121,6 +129,14 @@ AC_SUBST(COLM_LD)
AC_SUBST(COLM_LIBDEP)
AC_SUBST(COLM_BINDEP)
+SED_SUBST=["\
+ -e 's|@CRACK_BIN@|${CRACK_BIN}|g' \
+ -e 's|@CXX@|${CXX}|g' \
+ -e 's|@CC@|${CC}|g' \
+"]
+
+AC_SUBST(SED_SUBST)
+
dnl write output files
AC_OUTPUT([
Makefile
diff --git a/test/Makefile.am b/test/Makefile.am
index 9dd27413..e347a8dd 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,8 +2,6 @@ SUBDIRS = . aapl.d colm.d ragel.d rlhc.d rlparse.d trans.d
noinst_SCRIPTS = colm.mk colm.sh ragel.mk ragel.sh
-SED_SUBST = 's/@NO_ACTION@//'
-
colm.mk: colm.mk.in Makefile
@$(top_srcdir)/test/sedsubst $< $@ -w,+x $(SED_SUBST)
diff --git a/test/colm.d/Makefile.am b/test/colm.d/Makefile.am
index a67fc99e..18cca32e 100644
--- a/test/colm.d/Makefile.am
+++ b/test/colm.d/Makefile.am
@@ -1,8 +1,6 @@
noinst_SCRIPTS = gentests subject.mk subject.pl subject.sh
-SED_SUBST = 's/@NO_EFFECT@//'
-
-gentests: gentests.sh Makefile
+entests: gentests.sh Makefile
@$(top_srcdir)/test/sedsubst $< $@ -w,+x $(SED_SUBST)
subject.mk: subject.mk.in Makefile
diff --git a/test/colm.d/gentests.sh b/test/colm.d/gentests.sh
index 817e5ed4..20548561 100644
--- a/test/colm.d/gentests.sh
+++ b/test/colm.d/gentests.sh
@@ -42,9 +42,9 @@
WORKING=working
ERRORS=0
-COLM="@COLM_BIN@"
-CPPFLAGS="@COLM_CPPFLAGS@"
-LDFLAGS="@COLM_LDFLAGS@"
+COLM="../../colm/colm"
+CPPFLAGS="-I../../colm/include"
+LDFLAGS="-L../../colm/.libs -Wl,-rpath,../../colm/.libs"
# Make available to to test directories below us that are not part of this
# repository and cannot source one dir up.
diff --git a/test/ragel.d/Makefile.am b/test/ragel.d/Makefile.am
index 2a230c6b..09ae605e 100644
--- a/test/ragel.d/Makefile.am
+++ b/test/ragel.d/Makefile.am
@@ -20,7 +20,6 @@
COLM = ../../colm/colm
RAGEL_LM = ../../ragel
-SED_SUBST = 's/@NO_EFFECT@//'
COLM_CPPFLAGS = -I../../colm/include
COLM_LDFLAGS = -L../../colm
diff --git a/test/ragel.d/gentests.sh b/test/ragel.d/gentests.sh
index d27cd204..09c8ec49 100644
--- a/test/ragel.d/gentests.sh
+++ b/test/ragel.d/gentests.sh
@@ -14,22 +14,22 @@ TRANS=./trans
# Make available to to test directories below us that are not part of this
# repository and cannot source one dir up.
-export RAGEL_BIN="@RAGEL_BIN@"
-export RAGEL_CPPFLAGS="@RAGEL_CPPFLAGS@"
-export RAGEL_LDFLAGS="@RAGEL_LDFLAGS@"
-export LD_LIBRARY_PATH="@LD_LIBRARY_PATH@"
-
-export RAGEL_C_BIN="@RAGEL_C_BIN@"
-export RAGEL_D_BIN="@RAGEL_D_BIN@"
-export RAGEL_JAVA_BIN="@RAGEL_JAVA_BIN@"
-export RAGEL_RUBY_BIN="@RAGEL_RUBY_BIN@"
-export RAGEL_CSHARP_BIN="@RAGEL_CSHARP_BIN@"
-export RAGEL_GO_BIN="@RAGEL_GO_BIN@"
-export RAGEL_OCAML_BIN="@RAGEL_OCAML_BIN@"
-export RAGEL_ASM_BIN="@RAGEL_ASM_BIN@"
-export RAGEL_RUST_BIN="@RAGEL_RUST_BIN@"
-export RAGEL_CRACK_BIN="@RAGEL_CRACK_BIN@"
-export RAGEL_JULIA_BIN="@RAGEL_JULIA_BIN@"
+export RAGEL_BIN="../../ragel/ragel"
+export RAGEL_CPPFLAGS="-I../../ragel/include"
+export RAGEL_LDFLAGS="-L../../ragel/.libs"
+export LD_LIBRARY_PATH=""
+
+export RAGEL_C_BIN="../../ragel/host-c/ragel-c"
+export RAGEL_D_BIN="../../ragel/host-d/ragel-d"
+export RAGEL_JAVA_BIN="../../ragel/host-java/ragel-java"
+export RAGEL_RUBY_BIN="../../ragel/host-ruby/ragel-ruby"
+export RAGEL_CSHARP_BIN="../../ragel/host-csharp/ragel-csharp"
+export RAGEL_GO_BIN="../../ragel/host-go/ragel-go"
+export RAGEL_OCAML_BIN="../../ragel/host-ocaml/ragel-ocaml"
+export RAGEL_ASM_BIN="../../ragel/host-asm/ragel-asm"
+export RAGEL_RUST_BIN="../../ragel/host-rust/ragel-rust"
+export RAGEL_CRACK_BIN="../../ragel/host-crack/ragel-crack"
+export RAGEL_JULIA_BIN="../../ragel/host-julia/ragel-julia"
function sig_exit()
{