summaryrefslogtreecommitdiff
path: root/tests/sort
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sort')
-rw-r--r--tests/sort/Makefile.am7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/sort/Makefile.am b/tests/sort/Makefile.am
index cfadf64a9..a303f23c3 100644
--- a/tests/sort/Makefile.am
+++ b/tests/sort/Makefile.am
@@ -45,14 +45,17 @@ nul-nls.E use-nl.O use-nl.E o2.O o2.E nul-tab.O nul-tab.E
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
noinst_SCRIPTS = $x-tests
+TESTS_ENVIRONMENT = \
+ PATH="`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
TESTS = $x-tests
mk_script = $(srcdir)/../mk-script
-$(srcdir)/$x-tests: $(mk_script) Test.pm
- $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) ../../src/$x > $@.n
+$(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
+ test '$x' = test && prog=../../src/$x || prog=$x; \
+ $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) $$prog > $@.n
mv $@.n $@
chmod 755 $@