~ubuntu-branches/ubuntu/maverick/autoconf/maverick

« back to all changes in this revision

Viewing changes to tests/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Ben Pfaff
  • Date: 2007-01-17 19:57:13 UTC
  • mfrom: (3.1.7 feisty)
  • Revision ID: james.westby@ubuntu.com-20070117195713-n2q7e2pbpu4ezbx7
Tags: 2.61-4
debian/control: Require m4 version 1.4.8 or later.  Thanks to Jim
Paris <jim@jtan.com> for reporting this bug.  Closes: #407385.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
## Process this file with automake to create Makefile.in. -*-Makefile-*-
 
1
## Make Autoconf tests.
2
2
 
3
 
## Makefile for Autoconf testsuite.
4
 
## Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
3
## Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
4
## Free Software Foundation, Inc.
5
5
 
6
6
## This program is free software; you can redistribute it and/or modify
7
7
## it under the terms of the GNU General Public License as published by
15
15
 
16
16
## You should have received a copy of the GNU General Public License
17
17
## along with this program; if not, write to the Free Software
18
 
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
 
## 02111-1307, USA.
 
18
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
19
## 02110-1301, USA.
20
20
 
21
21
# We don't actually distribute the testsuite, since one only
22
22
# needs m4 to build it, m4 being required anyway to install Autoconf.
24
24
             atlocal.in package.m4 wrapper.as
25
25
 
26
26
# Running the uninstalled scripts.
27
 
check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
28
 
 
29
 
DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS)
 
27
check_SCRIPTS = $(wrappers)
 
28
DISTCLEANFILES = atconfig atlocal $(TESTSUITE)
 
29
MAINTAINERCLEANFILES = Makefile.in
30
30
 
31
31
# Import the dependencies on Autotest and M4sh.
32
32
include ../lib/freeze.mk
39
39
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
40
40
        {                                       \
41
41
          echo '# Signature of the current package.'; \
42
 
          echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
43
 
          echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
44
 
          echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
45
 
          echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
46
 
          echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
 
42
          echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])'; \
 
43
          echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])'; \
 
44
          echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])'; \
 
45
          echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])'; \
 
46
          echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
47
47
        } >$(srcdir)/package.m4
48
48
 
49
49
 
52
52
## Wrappers.  ##
53
53
## ---------- ##
54
54
 
55
 
$(srcdir)/wrapper.in: $(srcdir)/wrapper.as
56
 
        ./autom4te --language=M4sh $(srcdir)/wrapper.as -o $@
 
55
wrappers = autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames
 
56
CLEANFILES = wrapper.in $(wrappers)
 
57
 
 
58
wrapper.in: $(srcdir)/wrapper.as $(m4sh_m4f_dependencies)
 
59
        $(MY_AUTOM4TE) --language=M4sh $(srcdir)/wrapper.as -o $@
 
60
 
 
61
edit = sed \
 
62
        -e 's|@wrap_program[@]|$@|g' \
 
63
        -e 's|@abs_top_srcdir[@]|@abs_top_srcdir@|g' \
 
64
        -e 's|@abs_top_builddir[@]|@abs_top_builddir@|g' \
 
65
        -e "s|@configure_input[@]|Generated from $$input.|g"
 
66
 
 
67
$(wrappers): wrapper.in
 
68
        rm -f $@ $@.tmp
 
69
        input=wrapper.in; \
 
70
        $(edit) wrapper.in >$@.tmp
 
71
        chmod +x $@.tmp
 
72
        chmod a-w $@.tmp
 
73
        mv -f $@.tmp $@
57
74
 
58
75
 
59
76
 
62
79
## ------------ ##
63
80
 
64
81
TESTSUITE_GENERATED_AT = \
65
 
        aclang.at acc.at acfortran.at \
66
 
        acgeneral.at acstatus.at \
67
 
        acautoheader.at acautoupdate.at \
68
 
        acspecific.at acfunctions.at acheaders.at actypes.at \
69
 
        aclibs.at acprograms.at
 
82
        $(srcdir)/aclang.at \
 
83
        $(srcdir)/acc.at \
 
84
        $(srcdir)/acfortran.at \
 
85
        $(srcdir)/acgeneral.at \
 
86
        $(srcdir)/acstatus.at \
 
87
        $(srcdir)/acautoheader.at \
 
88
        $(srcdir)/acautoupdate.at \
 
89
        $(srcdir)/acspecific.at \
 
90
        $(srcdir)/acfunctions.at \
 
91
        $(srcdir)/acheaders.at \
 
92
        $(srcdir)/actypes.at \
 
93
        $(srcdir)/aclibs.at \
 
94
        $(srcdir)/acprograms.at
70
95
 
71
96
TESTSUITE_HAND_AT = \
72
97
        suite.at \
73
 
        m4sugar.at m4sh.at \
 
98
        m4sugar.at m4sh.at autotest.at \
74
99
        base.at tools.at torture.at \
75
100
        compile.at c.at fortran.at \
76
101
        semantics.at \
 
102
        autoscan.at \
77
103
        foreign.at
78
104
 
79
105
TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
82
108
# Run the non installed autom4te.
83
109
# Don't use AUTOM4TE since `make alpha' makes it unavailable although
84
110
# we are allowed to use it (since we ship it).
85
 
AUTOTEST = ./autom4te --language=autotest
 
111
AUTOTEST = $(MY_AUTOM4TE) --language=autotest
86
112
$(TESTSUITE): $(srcdir)/package.m4 \
87
113
              local.at \
88
114
              $(TESTSUITE_AT) \
89
115
              $(autotest_m4f_dependencies)
 
116
        cd $(top_builddir)/lib/autotest && $(MAKE) $(AM_MAKEFLAGS) autotest.m4f
90
117
        $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
91
118
        mv $@.tmp $@
92
119
 
96
123
clean-local:
97
124
        test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
98
125
        rm -f *.tmp
99
 
        rm -rf autom4te.cache
 
126
        rm -f -r autom4te.cache
100
127
 
101
128
check-local: atconfig atlocal $(TESTSUITE)
102
 
        $(SHELL) $(TESTSUITE)
 
129
        $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS)
103
130
 
104
131
# Run the test suite on the *installed* tree.
105
 
installcheck-local:
106
 
        $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
 
132
installcheck-local: atconfig atlocal $(TESTSUITE)
 
133
        $(SHELL) $(TESTSUITE) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS)
107
134
 
108
135
 
109
136
 
111
138
## Maintainer rules.  ##
112
139
## ------------------ ##
113
140
 
114
 
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE_GENERATED_AT)
 
141
MAINTAINERCLEANFILES += $(TESTSUITE_GENERATED_AT)
115
142
 
116
143
## Producing the test files.
117
144
 
118
 
# The files which contains macro we check for syntax.  Don't use $(top_srcdir)
119
 
# here since below we explicitly `cd' to $srcdir.  As for the dependencies,
120
 
# thanks God for VPATH.  Hm...
 
145
# The files which contain macros we check for syntax.  Use $(top_srcdir)
 
146
# for the benefit of non-GNU make.  Fix the names in the rule below
 
147
# where we `cd' to $srcdir.
121
148
autoconfdir = $(top_srcdir)/lib/autoconf
122
149
AUTOCONF_FILES = $(autoconfdir)/general.m4 \
123
150
                 $(autoconfdir)/status.m4 \
130
157
                 $(autoconfdir)/fortran.m4 \
131
158
                 $(autoconfdir)/headers.m4 \
132
159
                 $(autoconfdir)/libs.m4 \
133
 
                 $(autoconfdir)/types.m4        \
 
160
                 $(autoconfdir)/types.m4 \
134
161
                 $(autoconfdir)/programs.m4
135
162
 
136
163
$(TESTSUITE_GENERATED_AT): mktests.sh $(AUTOCONF_FILES)
137
 
        cd $(srcdir) && ./mktests.sh $(AUTOCONF_FILES)
 
164
        cd $(srcdir) && ./mktests.sh \
 
165
          `echo " "$(AUTOCONF_FILES) | sed 's, [^ ]*/, ../lib/autoconf/,g'`
138
166
 
139
167
 
140
168
## maintainer-check ##
142
170
maintainer-check: maintainer-check-posix maintainer-check-c++
143
171
 
144
172
# The hairy heredoc is more robust than using echo.
145
 
CLEANFILES = expr
 
173
CLEANFILES += expr
146
174
expr:
147
175
        echo '#! $(SHELL)'            >expr
148
 
        echo 'result=`@EXPR@ "$$@"`' >>expr
 
176
        echo 'result=`$(EXPR) "$$@"`'>>expr
149
177
        echo 'estatus=$$?'           >>expr
150
178
        echo 'cat <<EOF'             >>expr
151
179
        echo '$${result:-0}'         >>expr
155
183
 
156
184
# Try the test suite with more severe environments.
157
185
maintainer-check-posix: expr
158
 
        POSIXLY_CORRECTLY=yes make check
 
186
        POSIXLY_CORRECT=yes make check
159
187
        rm expr
160
188
 
161
189
# Try using G++ as a C compiler.