(|l)gpl-2.[01].tex: Remove the `\renewcommand{\theenumi}...' comments.
[cfd] / autotest.am
CommitLineData
74c50df9
MW
1### -*-makefile-*-
2###
3### Build script for test framework
4###
5### (c) 2008 Straylight/Edgeware
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the Common Files Distribution (`common').
11###
12### `Common' is free software; you can redistribute it and/or modify
13### it under the terms of the GNU General Public License as published by
14### the Free Software Foundation; either version 2 of the License, or
15### (at your option) any later version.
16###
17### `Common' is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU General Public License for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with `common'; if not, write to the Free Software Foundation,
24### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26EXTRA_DIST =
27CLEANFILES =
28DISTCLEANFILES =
29MAINTAINERCLEANFILES =
30
31###--------------------------------------------------------------------------
32### The test suite.
33
34check-local: atconfig run-tests
35 ./run-tests $(TEST_ARGS)
36
37###--------------------------------------------------------------------------
38### Building the test suite.
39
40## testsuite
41all_autotest_TESTS = $(autotest_TESTS) $(nodist_autotest_TESTS)
42TESTDEPS = testsuite.at Makefile.in $(all_autotest_TESTS)
43CLEANFILES += testsuite.log
44DISTCLEANFILES += atconfig
45MAINTAINERCLEANFILES += $(srcdir)/testsuite
46EXTRA_DIST += testsuite.at testsuite $(autotest_TESTS)
47
48$(srcdir)/testsuite: $(TESTDEPS)
6888a158 49 $(AM_V_GEN)$(AUTOM4TE) --language=autotest \
74c50df9
MW
50 -I$(srcdir) $@.at -o $@.new && mv $@.new $@
51
52clean-local: clean-testsuite-dir
53.PHONY: clean-testsuite-dir
54clean-testsuite-dir:
55 -rm -rf testsuite.dir
56
57## run-tests
58CLEANFILES += run-tests
59
60run-tests: Makefile $(srcdir)/testsuite
6888a158 61 $(AM_V_GEN) \
74c50df9
MW
62 { echo '#! /bin/sh'; \
63 echo 'exec $(SHELL) $(srcdir)/testsuite "$$@"'; \
64 } >$@.new && chmod +x $@.new && mv $@.new $@
65
66###--------------------------------------------------------------------------
67### Infrastructure for the test suite build process.
68
69## tests.m4
70TESTDEPS += $(srcdir)/tests.m4
71MAINTAINERCLEANFILES += $(srcdir)/tests.m4
72EXTRA_DIST += tests.m4
73
74$(srcdir)/tests.m4: Makefile.in
6888a158 75 $(AM_V_GEN) \
74c50df9
MW
76 for i in $(all_autotest_TESTS); do \
77 echo $$i | sed \
78 -e 's:^$(top_srcdir):$(top_builddir):' \
79 -e 's:\(.*\)/\([^/]*\)$$:TESTS([\1], [\2]):'; \
80 done >$@.new && mv $@.new $@
81
82## package.m4
83TESTDEPS += $(srcdir)/package.m4
84MAINTAINERCLEANFILES += $(srcdir)/package.m4
85EXTRA_DIST += package.m4
86
87$(srcdir)/package.m4: $(top_srcdir)/configure.ac
6888a158 88 $(AM_V_GEN) \
74c50df9
MW
89 { echo '### package information'; \
90 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
91 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
92 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
93 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
94 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
95 } >$@.new && mv $@.new $@
96
97###----- That's all, folks --------------------------------------------------