1 # Make coreutils tests. -*-Makefile-*-
3 # Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 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 3 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, see <http://www.gnu.org/licenses/>.
22 EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
23 noinst_SCRIPTS = $x-tests
25 editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
29 mk_script = $(srcdir)/../mk-script
30 $(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
31 test '$x' = test && prog=../../src/$x || prog=$x; \
32 $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) $$prog > $@.n
36 MAINTAINERCLEANFILES = $x-tests $(maint_gen)
37 CLEANFILES = $(run_gen)
41 $(srcdir)/Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
43 sed -n '1,/^##test-files-begin/p' $(srcdir)/../Makefile.am.in > $@t
44 tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
45 echo "x = $$tool" >> $@t
46 $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) --list >> $@t
47 sed -n '/^##test-files-end/,$$p' $(srcdir)/../Makefile.am.in >> $@t
51 include $(top_srcdir)/tests/check.mk