]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/mktests.sh (update_exclude_list, syntax_exclude_list): Add
authorAkim Demaille <akim@epita.fr>
Mon, 23 Oct 2000 18:58:43 +0000 (18:58 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 23 Oct 2000 18:58:43 +0000 (18:58 +0000)
`AC_PREREQ'.
* tests/tools.m4: Globally, don't use `../' to invoke the tested
tools, since the PATH is properly set, and in most cases it
obfuscates the test code.
(autoupdating AC_PREREQ): New tests.

ChangeLog
tests/mktests.sh
tests/syntax.m4
tests/tools.m4
tests/update.m4

index f558dac29f11a80a032d0209cda5384aa491f3dc..84980d8137a37aea24b04a6eda6811f9af7d6b3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-23  Akim Demaille  <akim@epita.fr>
+
+       * tests/mktests.sh (update_exclude_list, syntax_exclude_list): Add
+       `AC_PREREQ'.
+       * tests/tools.m4: Globally, don't use `../' to invoke the tested
+       tools, since the PATH is properly set, and in most cases it
+       obfuscates the test code.
+       (autoupdating AC_PREREQ): New tests.
+
 2000-10-23  Akim Demaille  <akim@epita.fr>
 
        In order to check that all the CPP symbols which are AC_DEFINE'd
index 26aafc90d88f266b8e95b901bcd1dd1719896be2..b654ed24b80ffd166d0431bf0fc2f442141bc48a 100755 (executable)
@@ -50,7 +50,7 @@ src="$@"
 # and some are already tested elsewhere.  EGREP_EXCLUDE must filter out
 # the macros we don't want to test in syntax.m4.
 #
-# - AC_CANONICALIZE, AC_PREFIX_PROGRAM
+# - AC_CANONICALIZE, AC_PREFIX_PROGRAM, AC_PREREQ
 #   Need an argument.
 # - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
 #   Performed in the semantics tests.
@@ -77,7 +77,7 @@ src="$@"
 # - AC_CYGWIN, AC_CYGWIN32, AC_EMXOS2, AC_MING32, AC_EXEEXT, AC_OBJEXT
 #   AU defined to nothing.
 syntax_exclude_list='^AC_ARG_VAR$
-^AC_CANONICALIZE$
+^AC_CANONICALIZE|AC_PREFIX_PROGRAM|AC_PREREQ$
 ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TOOL|TYPE)S?$
 ^AC_CONFIG
 ^AC_F77_FUNC$
@@ -88,7 +88,6 @@ syntax_exclude_list='^AC_ARG_VAR$
 ^AC_LIST_MEMBER_OF$
 ^AC_OUTPUT$
 ^AC_PATH_(TOOL|PROG)S?$
-^AC_PREFIX_PROGRAM$
 ^AC_REPLACE_FUNCS$
 ^AC_SEARCH_LIBS$
 ^AC_TRY
@@ -149,11 +148,14 @@ mv syntax.tm4 syntax.m4
 
 # update_exclude_list
 # -------------------
-# AC_LANG_RESTORE alone cannot be used.
-# AC_LINK_FILES needs argument and is tested elsewhere.
-# AC_INIT and AC_OUTPUT are already in `configure.in'.
+# AC_LANG_RESTORE
+#    cannot be used alone.
+# AC_LINK_FILES, AC_PREREQ
+#    need arguments and are tested elsewhere.
+# AC_INIT and AC_OUTPUT
+#    are already in `configure.in'.
 update_exclude_list='^AC_LANG_RESTORE$
-^AC_LINK_FILES$
+^AC_LINK_FILES|AC_PREREQ$
 ^AC_(INIT|OUTPUT)$'
 
 # syntax_exclude_egrep --
index a3958c21a4619bf1ae9a290407fab0432a5077cc..3ae1c7597c9b07c5db4914a3bd0d660c9a9bf578 100644 (file)
@@ -71,7 +71,6 @@ AT_CHECK_MACRO([AC_NO_EXECUTABLES])
 AT_CHECK_MACRO([AC_OUTPUT_COMMANDS])
 AT_CHECK_MACRO([AC_PATH_XTRA])
 AT_CHECK_MACRO([AC_PREFIX_DEFAULT])
-AT_CHECK_MACRO([AC_PREREQ])
 AT_CHECK_MACRO([AC_PROG_AWK])
 AT_CHECK_MACRO([AC_PROG_CC_C_O])
 AT_CHECK_MACRO([AC_PROG_F77_C_O])
index 3479df55fb31d7ee49729348827f675a242aef84..6a21f464182047153cb159a195c69c3810b26c24 100644 (file)
@@ -55,11 +55,11 @@ fi
 ]])
 
 if /bin/sh ./syntax.sh; then
-  AT_CHECK([/bin/sh -n ../autoconf],   0)
-  AT_CHECK([/bin/sh -n ../autoreconf], 0)
-  AT_CHECK([/bin/sh -n ../autoupdate], 0)
-  AT_CHECK([/bin/sh -n ../autoreconf], 0)
-  AT_CHECK([/bin/sh -n ../ifnames],    0)
+  AT_CHECK([/bin/sh -n autoconf],   0)
+  AT_CHECK([/bin/sh -n autoreconf], 0)
+  AT_CHECK([/bin/sh -n autoupdate], 0)
+  AT_CHECK([/bin/sh -n autoreconf], 0)
+  AT_CHECK([/bin/sh -n ifnames],    0)
 fi
 
 AT_CLEANUP
@@ -90,7 +90,7 @@ AC_CONFIG_HEADERS(config.h)
 AC_DEFINE(this, "whatever you want.")
 ]])
 
-AT_CHECK([../autoheader --autoconf-dir .. -<configure.in], 0,
+AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 0,
 [[/* config.h.in.  Generated automatically from - by autoheader.  */
 /* Define this to whatever you want. */
 #undef this
@@ -104,7 +104,7 @@ AC_CONFIG_HEADERS(config.h)
 AC_DEFINE(that, "whatever you want.")
 ]])
 
-AT_CHECK([../autoheader --autoconf-dir .. -<configure.in], 1, [],
+AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 1, [],
 [autoheader: No template for symbol `that'
 ])
 
@@ -132,7 +132,7 @@ AH_BOTTOM([Bottom2 from configure.in.])
 # Yes, that's right: the `middle' part of `acconfig.h' is still before
 # the AH_TOP part.  But so what, you're not supposed to use the two
 # together.
-AT_CHECK([../autoheader --autoconf-dir .. -<configure.in], 0,
+AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 0,
 [[/* config.h.in.  Generated automatically from - by autoheader.  */
 /* Top from acconfig.h. */
 
@@ -172,7 +172,7 @@ AC_OUTPUT(Makefile, echo $fubar, fubar=$fubar)
 ]])
 
 # Checking `autoupdate'.
-AT_CHECK([../autoupdate --autoconf-dir $top_srcdir -<configure.in], 0,
+AT_CHECK([autoupdate --autoconf-dir $top_srcdir -<configure.in], 0,
 [[AC_INIT
 AC_CANONICAL_TARGET()
 dnl The doc says 27 is a valid fubar.
@@ -185,7 +185,9 @@ AC_OUTPUT
 AT_CLEANUP
 
 
-AT_SETUP([autoupdating AC_LINK FILES])
+# autoupdating AC_LINK_FILES
+# --------------------------
+AT_SETUP([autoupdating AC_LINK_FILES])
 
 AT_DATA(configure.in,
 [[AC_INIT
@@ -199,10 +201,10 @@ AT_DATA(dst2, dst2
 )
 
 # Checking `autoupdate'.
-AT_CHECK([../autoupdate --autoconf-dir $top_srcdir], 0, [],
+AT_CHECK([autoupdate --autoconf-dir $top_srcdir], 0, [],
          [autoupdate: `configure.in' is updated
 ])
-AT_CHECK([../autoconf --autoconf-dir $top_srcdir], 0)
+AT_CHECK([autoconf --autoconf-dir $top_srcdir], 0)
 AT_CHECK([./configure], 0, ignore)
 AT_CHECK([cat src1], 0, [dst1
 ])
@@ -212,6 +214,30 @@ AT_CHECK([cat src2], 0, [dst2
 AT_CLEANUP(src1 src2)
 
 
+# autoupdating AC_PREREQ
+# ----------------------
+AT_SETUP([autoupdating AC_PREREQ])
+
+cat >expout <<EOF
+AC_PREREQ($at_version)
+EOF
+
+AT_CHECK([echo "AC_PREREQ(1.0)" |
+            autoupdate --autoconf-dir $top_srcdir -],
+         0, [expout], [])
+
+AT_CHECK([echo "AC_PREREQ($at_version)" |
+            autoupdate --autoconf-dir $top_srcdir -],
+         0, [expout], [])
+
+AT_CHECK([echo "AC_PREREQ(999.99)" |
+            autoupdate --autoconf-dir $top_srcdir -],
+         1, [], [ignore])
+
+AT_CLEANUP
+
+
+
 ## ------------------ ##
 ## autoconf --trace.  ##
 ## ------------------ ##
@@ -229,7 +255,7 @@ TRACE1(foo, [active], TRACE1(active, [active]))
 ]])
 
 # Several --traces.
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
 [[configure.in:4:TRACE1:foo:bar:baz
 configure.in:4:TRACE2:bar:baz
 configure.in:5:TRACE1:foo:AC_TRACE1(bar, baz)
@@ -243,7 +269,7 @@ configure.in:7:TRACE2:active::ACTIVE
 ]])
 
 # Several line requests.
-AT_CHECK([[../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
+AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
 [$1], [$2], [$3].']], 0,
 [[
 [foo], [bar], [baz].
@@ -258,7 +284,7 @@ AT_CHECK([[../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
 ]])
 
 # ${sep}@.
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
 [[[bar])===([baz]
 [AC_TRACE1(bar, baz)]
 [ACTIVE])===([baz]
@@ -284,7 +310,7 @@ AC_THIS_IS_PROBABLY_NOT_DEFINED
 It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
 ]])
 
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
 [[configure.in:2: error: undefined macro: AC_THIS_IS_PROBABLY_NOT_DEFINED
 configure:3: error: undefined macro: AC_OUTPUT
 ]])
@@ -307,10 +333,10 @@ AT_DATA([configure.in],
 
 if (gawk --version) >/dev/null 2>&1; then
   # Generation of the script.
-  AT_CHECK([AWK='gawk --posix' ../autoconf --autoconf-dir .. -l $at_srcdir], 0,
+  AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
            [], [])
   # Tracing.
-  AT_CHECK([AWK='gawk --posix' ../autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
+  AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
            ignore, [])
 fi
 
index e99c76aff793dd245083abeab21bdcac8d1d8223..7929e629b1c53099e0941fa78c501926c32c9012 100644 (file)
@@ -30,7 +30,6 @@ AT_CHECK_UPDATE([AC_LONG_64_BITS])
 AT_CHECK_UPDATE([AC_MEMORY_H])
 AT_CHECK_UPDATE([AC_MINGW32])
 AT_CHECK_UPDATE([AC_OUTPUT_COMMANDS])
-AT_CHECK_UPDATE([AC_PREREQ])
 AT_CHECK_UPDATE([AC_RSH])
 AT_CHECK_UPDATE([AC_SCO_INTL])
 AT_CHECK_UPDATE([AC_STRUCT_ST_BLKSIZE])