~ubuntu-branches/ubuntu/lucid/autoconf/lucid

« back to all changes in this revision

Viewing changes to tests/mktests.sh

  • Committer: Bazaar Package Importer
  • Author(s): Ben Pfaff
  • Date: 2005-01-08 16:59:38 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050108165938-1t9x9n0wdoby57oe
Tags: 2.59a-3
Flush info dir entry for autoconf.info.  Closes: #289012.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
 
3
3
# Build some of the Autoconf test files.
4
 
# Copyright 2000, 2001 Free Software Foundation, Inc.
 
4
# Copyright (C) 2000, 2001, 2002, 2003 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
81
81
#
82
82
# - AC_CANONICALIZE, AC_PREFIX_PROGRAM, AC_PREREQ
83
83
#   Need an argument.
 
84
#
84
85
# - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
85
86
#   Performed in the semantics tests.
 
87
#
86
88
# - AC_CONFIG
87
89
#   They fail when the source does not exist.
 
90
#
 
91
# - AC_FUNC_GETLOADAVG, AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU
 
92
#   Require a file that is not shipped with Autoconf.  But it should.
 
93
#
88
94
# - AC_INIT
89
95
#   AC_INIT includes all the AC_INIT macros.  Note that there is an
90
96
#   infinite m4 recursion if AC_INIT it used twice.
 
97
#
91
98
# - AC_LANG*
92
99
#   Heavily used by other macros.
93
 
# - AC_PATH_PROGS?, AC_F77_FUNC
 
100
#
 
101
# - AC_PATH_PROGS?, AC_F77_FUNC, AC_FC_FUNC, AC_FC_SRCEXT
94
102
#   They produce `= val' because $1, the variable used to store the result,
95
103
#   is empty.
 
104
#
 
105
# - AC_FC_FREEFORM
 
106
#   Requires the current language to be Fortran, not C.
 
107
#
96
108
# - AC_TRY, AC_.*_IFELSE, AC_RUN_LOG.
97
109
#   Used in many places.
 
110
#
98
111
# - _AC_
99
112
#   Internal macros are used elsewhere.
 
113
#
100
114
# - AC_OUTPUT
101
115
#   Already tested by `AT_CHECK_MACRO'.
 
116
#
102
117
# - AC_FD_CC
103
118
#   Is a number.
 
119
#
104
120
# - AC_PROG_CC, AC_C_(CONST|INLINE|VOLATILE), AC_PATH_XTRA
105
121
#   Checked in semantics.
 
122
#
106
123
# - AC_CYGWIN, AC_CYGWIN32, AC_EMXOS2, AC_MING32, AC_EXEEXT, AC_OBJEXT
107
124
#   AU defined to nothing.
 
125
#
108
126
# - AC_PATH_XTRA
109
127
#   Checked in semantics.
 
128
#
110
129
# - AC_SYS_RESTARTABLE_SYSCALLS, AC_FUNC_WAIT3
111
130
#   Obsolete, checked in semantics.
112
131
#
114
133
^AC_CANONICALIZE|AC_PREFIX_PROGRAM|AC_PREREQ$
115
134
^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TOOL|TYPE)S?$
116
135
^AC_CONFIG
117
 
^AC_F77_FUNC$
 
136
^AC_(F77|FC)_FUNC$
 
137
^AC_FC_(FUNC|FREEFORM|SRCEXT)$
 
138
^AC_FD_CC$
 
139
^AC_FUNC_(GETLOADAVG|FNMATCH_GNU|WAIT3)$
118
140
^AC_INIT
119
141
^AC_LANG
120
142
^AC_LINKER_OPTION$
122
144
^AC_LIST_MEMBER_OF$
123
145
^AC_OUTPUT$
124
146
^AC_PATH_(TOOL|PROG)S?$
125
 
^AC_REPLACE_FUNCS$
 
147
^AC_REPLACE_(FNMATCH|FUNCS)$
126
148
^AC_SEARCH_LIBS$
127
149
^(AC_TRY.*|AC_RUN_LOG)$
128
150
^AC_.*_IFELSE$
129
 
^AC_FD_CC$
130
 
^(AC_(PROG_CC|C_CONST|C_INLINE|C_VOLATILE))$
 
151
^(AC_(PROG_CC|C_CONST|C_INLINE|C_RESTRICT|C_VOLATILE))$
131
152
^AC_(CYGWIN|CYGWIN32|EMXOS2|MING32|EXEEXT|OBJEXT)$
132
153
^AC_PATH_XTRA$
133
154
^AC_SYS_RESTARTABLE_SYSCALLS$
134
 
^AC_FUNC_WAIT3$
135
155
_AC_'
136
156
 
137
157
 
138
158
# ac_exclude_egrep
139
159
# ----------------
140
 
# Build a single egrep pattern out of filter_macros_list.
141
 
# Sed is used to get rid of the trailing `|' coming from the trailing
142
 
# `\n' from `echo'.
143
 
ac_exclude_egrep=`echo "$exclude_list$ac_exclude_list" | tr '
144
 
' '|' | sed 's/.$//'`
 
160
# Build a single extended regular expression out of filter_macros_list.
 
161
ac_exclude_egrep=$exclude_list$ac_exclude_list
145
162
 
146
163
 
147
164
# au_exclude_list
152
169
#    need arguments and are tested elsewhere.
153
170
# AC_INIT and AC_OUTPUT
154
171
#    are already in `configure.ac'.
 
172
# AC_C_CROSS and AC_PROG_CC_STDC
 
173
#    are empty.
155
174
# AC_CYGWIN, AC_MINGW32, AC_EMXOS2
156
175
#    are using AC_REQUIRE.
157
176
au_exclude_list='^AC_LANG_RESTORE$
158
177
^AC_LINK_FILES|AC_PREREQ$
159
178
^AC_(INIT|OUTPUT)$
 
179
^AC_C_CROSS|AC_PROG_CC_STDC$
160
180
^AC_(CYGWIN|MINGW32|EMXOS2)$'
161
181
 
162
182
 
163
183
# au_exclude_egrep
164
184
# ----------------
165
 
# Build a single egrep pattern out of filter_macros_list.
166
 
# Sed is used to get rid of the trailing `|' coming from the trailing
167
 
# `\n' from `echo'.
168
 
au_exclude_egrep=`echo "$exclude_list$au_exclude_list" | tr '
169
 
' '|' | sed 's/.$//'`
170
 
 
 
185
# Build a single extended regular expression out of filter_macros_list.
 
186
au_exclude_egrep=$exclude_list$au_exclude_list
 
187
 
 
188
 
 
189
# egrep
 
190
# -----
 
191
if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
192
then egrep='grep -E'
 
193
else egrep='egrep'
 
194
fi
171
195
 
172
196
 
173
197
## ------------------------- ##
185
209
    sort |
186
210
    uniq |
187
211
    # Watch out we are `set -e': don't fail.
188
 
    ( egrep -v "$ac_exclude_egrep" || true) >acdefuns
 
212
    ($egrep -v "$ac_exclude_egrep" || true) >acdefuns
189
213
 
190
214
  # Get the list of macros which are defined in Autoupdate level.
191
215
  cat $file |
192
216
    sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' |
193
217
    sort |
194
218
    uniq |
195
 
    ( egrep -v "$au_exclude_egrep" || true) > audefuns
 
219
    ($egrep -v "$au_exclude_egrep" || true) > audefuns
196
220
 
197
221
  # Filter out required macros.
198
222
  {
199
223
    sed 's/^ *//' <<MK_EOF
200
 
    # Generated by $as_me, do not edit by hand. -*- Autotest -*-
201
 
    # Copyright 2000, 2001 Free Software Foundation, Inc.
 
224
    # Generated by $as_me.                      -*- Autotest -*-
 
225
 
 
226
    ## --------------------- ##
 
227
    ## Do not edit by hand.  ##
 
228
    ## --------------------- ##
 
229
 
 
230
    # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
202
231
 
203
232
    AT_BANNER([Testing autoconf/$base macros.])
204
233
 
206
235
 
207
236
    echo "# Modern macros."
208
237
    for macro in `cat acdefuns`; do
209
 
      if fgrep "$macro" requires >/dev/null 2>&1; then :; else
 
238
      if grep "$macro" requires >/dev/null 2>&1; then :; else
210
239
        echo "AT_CHECK_MACRO([$macro])"
211
240
      fi
212
241
    done
213
242
    echo
214
243
    echo "# Obsolete macros."
215
244
    for macro in `cat audefuns`; do
216
 
      if fgrep "$macro" requires >/dev/null 2>&1; then :; else
 
245
      if grep "$macro" requires >/dev/null 2>&1; then :; else
217
246
        echo "AT_CHECK_AU_MACRO([$macro])"
218
247
      fi
219
248
    done
222
251
  # In one atomic step so that if something above fails, the trap
223
252
  # preserves the old version of the file.  If there is nothing to
224
253
  # check, output /rien du tout/[1].
225
 
  if fgrep AT_CHECK ac$base.tat >/dev/null 2>&1; then
226
 
    mv ac$base.tat ac$base.at
 
254
  if grep AT_CHECK ac$base.tat >/dev/null 2>&1; then
 
255
    mv -f ac$base.tat ac$base.at
 
256
    # Help people not to update these files by hand.
 
257
    chmod a-w ac$base.at
227
258
  else
228
259
    rm -f ac$base.tat ac$base.at
229
260
    touch ac$base.at