summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a3389518..878ca04f 100644
--- a/Makefile
+++ b/Makefile
@@ -68,9 +68,14 @@ tests/001/%: TXR_ARGS := $(top_srcdir)/tests/001/data
tests/002/%: TXR_OPTS := -DTESTDIR=$(top_srcdir)/tests/002
tests/004/%: TXR_ARGS := -a 123 -b -c
+tests/002/%: TXR_SCRIPT_ON_CMDLINE := y
+
%.ok: %.txr
mkdir -p $(dir $@)
- $(PROG) $(TXR_DBG_OPTS) $(TXR_OPTS) $^ $(TXR_ARGS) > $(@:.ok=.out)
+ $(if $(TXR_SCRIPT_ON_CMDLINE),\
+ $(PROG) $(TXR_DBG_OPTS) $(TXR_OPTS) -c "$$(cat $^)" \
+ $(TXR_ARGS) > $(@:.ok=.out),\
+ $(PROG) $(TXR_DBG_OPTS) $(TXR_OPTS) $^ $(TXR_ARGS) > $(@:.ok=.out))
diff $(^:.txr=.expected) $(@:.ok=.out)
%.expected: %.txr