diff options
author | Victor Westerhuis <victor@westerhu.is> | 2021-12-03 14:41:24 +0100 |
---|---|---|
committer | Victor Westerhuis <victor@westerhu.is> | 2021-12-04 01:08:24 +0100 |
commit | 5cf37adb380b4ddf819951913c4d3044071f7e6b (patch) | |
tree | 663e6a81759461beb66067b0e9f4963624f563e3 /test/trans.d/Makefile.am | |
parent | cb0dc1bcb82a9ff4e623a49d05a52ae1f63d0626 (diff) | |
download | colm-5cf37adb380b4ddf819951913c4d3044071f7e6b.tar.gz |
Make tests buildable in out-of-tree build
Let libtool take care of the linking. Prefer linking to libcolm
statically, like before. Add explicit include paths for files included
from the corresponding source directory.
Diffstat (limited to 'test/trans.d/Makefile.am')
-rw-r--r-- | test/trans.d/Makefile.am | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/trans.d/Makefile.am b/test/trans.d/Makefile.am index 4a9d8798..30b53ff1 100644 --- a/test/trans.d/Makefile.am +++ b/test/trans.d/Makefile.am @@ -1,7 +1,7 @@ COLM_BIN = ../../src/colm COLM_xCPPFLAGS = -I../../src/include -COLM_xLDFLAGS = -L../../src +COLM_xLDADD = ../../src/libcolm.la noinst_PROGRAMS = trans @@ -29,12 +29,12 @@ EXTRA_DIST = \ $(CASES) trans.c: trans.lm $(TRANS_DEPS) $(COLM_BIN) - $(COLM_BIN) -b trans_object -c -o $@ $< + $(COLM_BIN) -b trans_object -c -o $@ -I$(srcdir) $< trans_CPPFLAGS = $(COLM_xCPPFLAGS) trans_SOURCES = actparams.cc trans.c main.c -trans_LDADD = -lcolm -trans_LDFLAGS = $(COLM_xLDFLAGS) +trans_LDADD = $(COLM_xLDADD) +trans_LDFLAGS = -static CASES = \ case/any1_asm.rl \ @@ -378,5 +378,15 @@ CASES = \ case/zlen1_ruby.rl \ case/zlen1_rust.rl +CLEANFILES = gentests + clean-local: - rm -Rf working + rm -Rf working case + +all-local: + if test '$(builddir)' != '$(srcdir)'; then \ + $(LN_S) -f '$(srcdir)/gentests' '$(srcdir)/case' '$(builddir)'; \ + fi + +check-local: + '$(top_srcdir)/test/runtests' |