1 # Make coreutils tests. -*-Makefile-*-
3 # Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
25 noinst_SCRIPTS = $x-tests
27 PATH="`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
29 editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
33 mk_script = $(srcdir)/../mk-script
34 $(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
35 test '$x' = test && prog=../../src/$x || prog=$x; \
36 $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) $$prog > $@.n
40 MAINTAINERCLEANFILES = $x-tests $(maint_gen)
41 CLEANFILES = $(run_gen)
45 $(srcdir)/Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
47 sed -n '1,/^##test-files-begin/p' $(srcdir)/../Makefile.am.in > $@t
48 tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
49 echo "x = $$tool" >> $@t
50 $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) --list >> $@t
51 sed -n '/^##test-files-end/,$$p' $(srcdir)/../Makefile.am.in >> $@t