diff options
author | Jim Meyering <jim@meyering.net> | 2004-05-31 12:16:47 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-05-31 12:16:47 +0000 |
commit | b6220a928fde2292b12c525db8e7f6bd53c963b5 (patch) | |
tree | 0fbe0f0ecc0cb24c085989b068fd600d2a70d045 | |
parent | bc8843e1ca1619778515475375944e8b92a2c989 (diff) | |
download | coreutils-b6220a928fde2292b12c525db8e7f6bd53c963b5.tar.xz |
(TESTS_ENVIRONMENT): Define PATH to include
the build src/ directory -- at the front.
($(srcdir)/$x-tests): Depend on Makefile.am.
Use $x as the program name, except when it would be `test' (test is
the sole program tested via mk-script that is also a shell built-in).
In that case, use the old ../../src/$x.
-rw-r--r-- | tests/Makefile.am.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Makefile.am.in b/tests/Makefile.am.in index a0a1001e7..23f2cfaa4 100644 --- a/tests/Makefile.am.in +++ b/tests/Makefile.am.in @@ -5,14 +5,17 @@ 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 $@ |