Tizen 2.0 Release
[external/tizen-coreutils.git] / tests / join / Makefile.am
1 # Make coreutils tests.                                 -*-Makefile-*-
2
3 # Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
4 # Foundation, Inc.
5
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.
10
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.
15
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
19 # 02110-1301, USA.
20
21 ##test-files-begin
22 x = join
23 explicit =
24 maint_gen = 1a.I1 1a.I2 1a.X 1b.I1 1b.I2 1b.X 1c.I1 1c.I2 1c.X 1d.I1 1d.I2 \
25 1d.X 1e.I1 1e.I2 1e.X 1f.I1 1f.I2 1f.X 2a.I1 2a.I2 2a.X 2b.I1 2b.I2 2b.X \
26 2c.I1 2c.I2 2c.X 3a.I1 3a.I2 3a.X 4a.I1 4a.I2 4a.X 4b.I1 4b.I2 4b.X 4c.I1 \
27 4c.I2 4c.X 4d.I1 4d.I2 4d.X 4e.I1 4e.I2 4e.X 5a.I1 5a.I2 5a.X 5b.I1 5b.I2 \
28 5b.X 5c.I1 5c.I2 5c.X 5d.I1 5d.I2 5d.X 5e.I1 5e.I2 5e.X 5f.I1 5f.I2 5f.X \
29 5g.I1 5g.I2 5g.X 5h.I1 5h.I2 5h.X 5i.I1 5i.I2 5i.X 5j.I1 5j.I2 5j.X 5k.I1 \
30 5k.I2 5k.X 5l.I1 5l.I2 5l.X 5m.I1 5m.I2 5m.X 6a.I1 6a.I2 6a.X 6b.I1 6b.I2 \
31 6b.X 6c.I1 6c.I2 6c.X 7a.I1 7a.I2 7a.X 8a.I1 8a.I2 8a.X 8b.I1 8b.I2 8b.X \
32 9a.I1 9a.I2 9a.X trailing-sp.I1 trailing-sp.I2 trailing-sp.X sp-vs-blank.I1 \
33 sp-vs-blank.I2 sp-vs-blank.X 8-bit-t.I1 8-bit-t.I2 8-bit-t.X bigfield.I1 \
34 bigfield.I2 bigfield.X invalid-j.X
35 run_gen = 1a.O 1a.E 1b.O 1b.E 1c.O 1c.E 1d.O 1d.E 1e.O 1e.E 1f.O 1f.E 2a.O \
36 2a.E 2b.O 2b.E 2c.O 2c.E 3a.O 3a.E 4a.O 4a.E 4b.O 4b.E 4c.O 4c.E 4d.O 4d.E \
37 4e.O 4e.E 5a.O 5a.E 5b.O 5b.E 5c.O 5c.E 5d.O 5d.E 5e.O 5e.E 5f.O 5f.E 5g.O \
38 5g.E 5h.O 5h.E 5i.O 5i.E 5j.O 5j.E 5k.O 5k.E 5l.O 5l.E 5m.O 5m.E 6a.O 6a.E \
39 6b.O 6b.E 6c.O 6c.E 7a.O 7a.E 8a.O 8a.E 8b.O 8b.E 9a.O 9a.E trailing-sp.O \
40 trailing-sp.E sp-vs-blank.O sp-vs-blank.E 8-bit-t.O 8-bit-t.E bigfield.O \
41 bigfield.E invalid-j.O invalid-j.E
42 ##test-files-end
43
44 EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
45 noinst_SCRIPTS = $x-tests
46 TESTS_ENVIRONMENT = \
47   CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
48   PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
49
50 editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
51
52 TESTS = $x-tests
53
54 mk_script = $(srcdir)/../mk-script
55 $(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
56         test '$x' = test && prog=../../src/$x || prog=$x; \
57         $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) $$prog > $@.n
58         mv $@.n $@
59         chmod 755 $@
60
61 MAINTAINERCLEANFILES = $x-tests $(maint_gen)
62 CLEANFILES = $(run_gen)
63
64 check: $(maint_gen)
65
66 $(srcdir)/Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
67         rm -f $@ $@t
68         sed -n '1,/^##test-files-begin/p' $(srcdir)/../Makefile.am.in > $@t
69         tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
70           echo "x = $$tool" >> $@t
71         $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) --list >> $@t
72         sed -n '/^##test-files-end/,$$p' $(srcdir)/../Makefile.am.in >> $@t
73         chmod -w $@t
74         mv $@t $@