autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: Splitting shell.m4, tests/shell.m4, tests/m4sugar.m4


From: Akim Demaille
Subject: FYI: Splitting shell.m4, tests/shell.m4, tests/m4sugar.m4
Date: 25 Oct 2000 19:29:16 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

Here is the big guy.

There is something I don't understand well: suddenly I see numerous
failures of the test suite, in fact each test involving autoupdate
fails.  I didn't observe the failures before, so it seems that the
following patch introduced the failures.

But I really doubt it, there is nothing in there which could be
responsible.  So I guess I had something broken in my time stamps, and
this patch revealed something broken in the test suite.  A quick
browse reveals that it is the test suite itself that runs autoupdate
incorrectly (I suspect the patch that was once sent for better
separation between srcdir and builddir).  BTW, distcheck behaves much
better than in place make check.

We will have to work on this.  As a first proposal I'd say that maybe
we should AC_LINK_FILES acgeneral.m4 etc. from srcdir to builddir.
The test suite is probably broken because autoupdate assumes all the
library files are installed in a single directory, which is false when
`make distcheck': the m4f files are in buiddir, and the m4 files in
srcdir.

Still, tomorrow is another day :)

Grr, cvsdiff doesn't show new files...

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        Move the Autoconf independent shell macros into the file
        `shell.m4' and the name space `AS_*'.

        * acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
        (AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
        * shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
        (AS_DIRNAME): here, a new file.
        Adjust all dependencies.

        * tests/base.m4 (m4_wrap): Eve out into...
        * tests/shell.m4: here, new file.
        * tests/base.m4 (AC_SHELL_MKDIR_P)
        (AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
        * tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
        here, new file.
        Adjust the test suite.

Index: Makefile.am
===================================================================
RCS file: /cvs/autoconf/Makefile.am,v
retrieving revision 1.30
diff -u -r1.30 Makefile.am
--- Makefile.am 2000/10/25 11:30:23 1.30
+++ Makefile.am 2000/10/25 17:04:44
@@ -35,9 +35,13 @@
 # s/nodistpackageDATA/nodist_pkgdata_DATA/
 # and adapt dependencies once we use a more recent Automake
 
+m4sources =  m4sugar.m4 shell.m4  \
+             autoconf.m4 \
+             acgeneral.m4 acoldnames.m4 acspecific.m4 aclang.m4 acversion.m4 \
+             acfunctions.m4
+
 distpkgdataDATA = acfunctions acheaders acidentifiers acmakevars acprograms \
-                  m4sugar.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 \
-                  autoconf.m4 aclang.m4 acversion.m4 acfunctions.m4
+                 $(m4sources)
 
 nodistpkgdataDATA = autoconf.m4f
 
@@ -142,11 +146,8 @@
 
 .m4.m4f:
        $(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f
-
-common = m4sugar.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 acversion.m4 \
-         aclang.m4 acfunctions.m4
 
-autoconf.m4f: autoconf.m4 $(common)
+autoconf.m4f: $(m4sources)
 
 
 ## ---------- ##
Index: acfunctions.m4
===================================================================
RCS file: /cvs/autoconf/acfunctions.m4,v
retrieving revision 1.11
diff -u -r1.11 acfunctions.m4
--- acfunctions.m4 2000/10/23 04:07:42 1.11
+++ acfunctions.m4 2000/10/25 17:09:05
@@ -69,8 +69,8 @@
 [AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])],
                 [AC_VAR_SET(ac_var, yes)],
                 [AC_VAR_SET(ac_var, no)])])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_var) = yes],
-               [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_var) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_var])dnl
 ])# AC_CHECK_FUNC
 
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.595
diff -u -r1.595 acgeneral.m4
--- acgeneral.m4 2000/10/25 15:04:30 1.595
+++ acgeneral.m4 2000/10/25 17:15:07
@@ -811,133 +811,6 @@
 define([_AH_COUNTER], [0])
 
 
-## --------------------- ##
-## Some /bin/sh idioms.  ##
-## --------------------- ##
-
-
-# AC_SHELL_IFELSE(TEST, [IF-TRUE], [IF-FALSE])
-# --------------------------------------------
-# Expand into
-# | if TEST; then
-# |   IF-TRUE
-# | else
-# |   IF-FALSE
-# | fi
-# with simplifications is IF-TRUE and/or IF-FALSE is empty.
-define([AC_SHELL_IFELSE],
-[ifval([$2$3],
-[if $1; then
-  ifval([$2], [$2], :)
-m4_ifvanl([$3],
-[else
-  $3])dnl
-fi
-])dnl
-])# AC_SHELL_IFELSE
-
-
-# _AC_SHELL_TMPDIR(PREFIX)
-# ------------------------
-# Create as safely as possible a temporary directory which name is
-# inspired by PREFIX (should be 2-4 chars max), and set trap
-# mechanisms to remove it.
-define([_AC_SHELL_TMPDIR],
-[# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap 'exit $?' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/$1XXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/$1$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
-}dnl
-])# _AC_SHELL_TMPDIR
-
-
-# AC_SHELL_UNSET(VAR, [VALUE-IF-UNSET-NOT-SUPPORTED = `'])
-# --------------------------------------------------------
-# Try to unset the env VAR, otherwise set it to
-# VALUE-IF-UNSET-NOT-SUPPORTED.  `ac_unset' must have been computed.
-define([AC_SHELL_UNSET],
-[$ac_unset $1 || test "${$1+set}" != set || { $1=$2; export $1; }])
-
-
-# AC_SHELL_MKDIR_P(PATH)
-# ----------------------
-# Emulate `mkdir -p' with plain `mkdir'.
-define([AC_SHELL_MKDIR_P],
-[{ case $1 in
-  [[\\/]]* | ?:[[\\/]]* ) ac_incr_dir=;;
-  *)                      ac_incr_dir=.;;
-esac
-ac_dummy="$1"
-for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "address@hidden"`; do
-  ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
-  test -d $ac_incr_dir || mkdir $ac_incr_dir
-done; }
-])# AC_SHELL_MKDIR_P
-
-
-# AC_SHELL_DIRNAME(PATHNAME)
-# --------------------------
-# Simulate running `dirname(1)' on PATHNAME, not all systems have it.
-# This macro must be usable from inside ` `.
-#
-# Paul Eggert answers:
-# Question: Under UN*X, should `//1' give `/'?
-#
-#   No, under some older flavors of Unix, leading // is a special path
-#   name: it refers to a "super-root" and is used to access other
-#   machines' files.  Leading ///, ////, etc. are equivalent to /; but
-#   leading // is special.  I think this tradition started with Apollo
-#   Domain/OS, an OS that is still in use on some older hosts.
-#
-#   POSIX.2 allows but does not require the special treatment for //.
-#   It says that the behavior of dirname on path names of the form
-#   //([^/]+/*)? is implementation defined.  In these cases, GNU dirname
-#   returns /, but it's more portable to return // as this works even on
-#   those older flavors of Unix.
-#
-#   I have heard rumors that this special treatment of // may be dropped
-#   in future versions of POSIX, but for now it's still the standard.
-#
-# Prefer expr to echo|sed, since expr is usually faster and it handles
-# backslashes and newlines correctly.  However, older expr
-# implementations (e.g. SunOS 4 expr and Solaris 8 /usr/ucb/expr) have
-# a silly length limit that causes expr to fail if the matched
-# substring is longer than 120 bytes.  So fall back on echo|sed if
-# expr fails.
-define([AC_SHELL_DIRNAME_EXPR],
-[expr X[]$1 : 'X\(.*[[^/]]\)//*[[^/][^/]]*/*$' \| \
-      X[]$1 : 'X\(//\)[[^/]]' \| \
-      X[]$1 : 'X\(//\)$' \| \
-      X[]$1 : 'X\(/\)' \| \
-      .     : '\(.\)'])
-
-define([AC_SHELL_DIRNAME_SED],
-[echo "X[]$1" |
-    sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q']])
-
-define([AC_SHELL_DIRNAME],
-[AC_SHELL_DIRNAME_EXPR([$1]) 2>/dev/null ||
-AC_SHELL_DIRNAME_SED([$1])])
 
 
 ## --------------------------------------------------- ##
@@ -999,7 +872,7 @@
 # Implement a shell `if-then-else' depending whether VARIABLE is set
 # or not.  Polymorphic.
 define([AC_VAR_SET_IFELSE],
-[AC_SHELL_IFELSE([AC_VAR_TEST_SET([$1])], [$2], [$3])])
+[AS_IFELSE([AC_VAR_TEST_SET([$1])], [$2], [$3])])
 
 
 # AC_VAR_PUSHDEF and AC_VAR_POPDEF
@@ -1946,14 +1819,14 @@
 fi
 
 # NLS nuisances.
-AC_SHELL_UNSET([LANG],        [C])
-AC_SHELL_UNSET([LC_ALL],      [C])
-AC_SHELL_UNSET([LC_TIME],     [C])
-AC_SHELL_UNSET([LC_CTYPE],    [C])
-AC_SHELL_UNSET([LANGUAGE],    [C])
-AC_SHELL_UNSET([LC_COLLATE],  [C])
-AC_SHELL_UNSET([LC_NUMERIC],  [C])
-AC_SHELL_UNSET([LC_MESSAGES], [C])
+AS_UNSET([LANG],        [C])
+AS_UNSET([LC_ALL],      [C])
+AS_UNSET([LC_TIME],     [C])
+AS_UNSET([LC_CTYPE],    [C])
+AS_UNSET([LANGUAGE],    [C])
+AS_UNSET([LC_COLLATE],  [C])
+AS_UNSET([LC_NUMERIC],  [C])
+AS_UNSET([LC_MESSAGES], [C])
 
 # IFS
 # We need space, tab and new line, in precisely that order.
@@ -1962,7 +1835,7 @@
 IFS="  $ac_nl"
 
 # CDPATH.
-AC_SHELL_UNSET([CDPATH], [:])
+AS_UNSET([CDPATH], [:])
 ])
 
 
@@ -3052,8 +2925,8 @@
 foo.patsubst([$1], [^[^.]*\.]);])],
                 AC_VAR_SET(ac_Member, yes),
                 AC_VAR_SET(ac_Member, no))])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_Member) = yes],
-                [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_Member) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_Member])dnl
 ])# AC_CHECK_MEMBER
 
@@ -3300,7 +3173,7 @@
   echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
   AC_PATH_PROG(m4_quote(AC_Prog), [$1])
   if test -n "$ac_cv_path_[]AC_Prog"; then
-    prefix=`AC_SHELL_DIRNAME([$ac_cv_path_[]AC_Prog])`
+    prefix=`AS_DIRNAME([$ac_cv_path_[]AC_Prog])`
   fi
 fi
 popdef([AC_Prog])dnl
@@ -3340,7 +3213,7 @@
 break])
 done
 LIBS=$ac_func_search_save_LIBS])
-AC_SHELL_IFELSE([test "$ac_cv_search_$1" != no],
+AS_IFELSE([test "$ac_cv_search_$1" != no],
   [test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
   $3],
                 [$4])[]dnl
@@ -3378,9 +3251,9 @@
                  [AC_VAR_SET(ac_Lib, yes)],
                  [AC_VAR_SET(ac_Lib, no)])
 LIBS=$ac_check_lib_save_LIBS])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_Lib) = yes],
-                [m4_default([$3],
-                            [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
+AS_IFELSE([test AC_VAR_GET(ac_Lib) = yes],
+          [m4_default([$3],
+                      [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
   LIBS="-l$1 $LIBS"
 ])],
                 [$4])dnl
@@ -3659,8 +3532,8 @@
 [AC_TRY_CPP([#include <$1>
 ],
 AC_VAR_SET(ac_Header, yes), AC_VAR_SET(ac_Header, no))])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_Header) = yes],
-                [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_Header) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_Header])dnl
 ])# AC_CHECK_HEADER
 
@@ -3704,8 +3577,8 @@
 else
   AC_VAR_SET(ac_File, no)
 fi])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_File) = yes],
-                [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_File) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_File])dnl
 ])# AC_CHECK_FILE
 
@@ -3740,8 +3613,8 @@
 #endif
 ])],
 AC_VAR_SET(ac_Symbol, yes), AC_VAR_SET(ac_Symbol, no))])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_Symbol) = yes],
-                [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_Symbol) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_Symbol])dnl
 ])# AC_CHECK_DECL
 
@@ -3972,8 +3845,8 @@
   return 0;])],
                 AC_VAR_SET(ac_Type, yes),
                 AC_VAR_SET(ac_Type, no))])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_Type) = yes],
-                [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_Type) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_Type])dnl
 ])# _AC_CHECK_TYPE_NEW
 
@@ -4716,7 +4589,7 @@
 ])dnl
 fi
 
-_AC_SHELL_TMPDIR(cs)
+AS_TMPDIR(cs)
 
 EOF
 ])[]dnl ifval
@@ -4872,9 +4745,9 @@
   esac
 
   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-  ac_dir=`AC_SHELL_DIRNAME("$ac_file")`
+  ac_dir=`AS_DIRNAME("$ac_file")`
   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    AC_SHELL_MKDIR_P("$ac_dir")
+    AS_MKDIR_P("$ac_dir")
     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dir_suffix.
     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
@@ -5194,9 +5067,9 @@
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
       echo "$ac_file is unchanged"
     else
-      ac_dir=`AC_SHELL_DIRNAME("$ac_file")`
+      ac_dir=`AS_DIRNAME("$ac_file")`
       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-        AC_SHELL_MKDIR_P("$ac_dir")
+        AS_MKDIR_P("$ac_dir")
       fi
       rm -f $ac_file
       mv $tmp/config.h $ac_file
@@ -5245,9 +5118,9 @@
   rm -f $ac_dest
 
   # Make relative symlinks.
-  ac_dest_dir=`AC_SHELL_DIRNAME("$ac_dest")`
+  ac_dest_dir=`AS_DIRNAME("$ac_dest")`
   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    AC_SHELL_MKDIR_P("$ac_dest_dir")
+    AS_MKDIR_P("$ac_dest_dir")
     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dest_dir_suffix.
     ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
@@ -5356,7 +5229,7 @@
     echo configuring in $ac_subdir
     case $srcdir in
     .) ;;
-    *) AC_SHELL_MKDIR_P(./$ac_subdir)
+    *) AS_MKDIR_P(./$ac_subdir)
        if test -d ./$ac_subdir; then :;
        else
          AC_MSG_ERROR(cannot create `pwd`/$ac_subdir)
@@ -5482,5 +5355,5 @@
     fi
   done
 
-  AC_SHELL_IFELSE([test x"$ac_exists" = xtrue], [$3], [$4])
+  AS_IFELSE([test x"$ac_exists" = xtrue], [$3], [$4])
 ])
Index: acspecific.m4
===================================================================
RCS file: /cvs/autoconf/acspecific.m4,v
retrieving revision 1.305
diff -u -r1.305 acspecific.m4
--- acspecific.m4 2000/10/23 04:07:43 1.305
+++ acspecific.m4 2000/10/25 17:15:39
@@ -346,8 +346,8 @@
                                     [DIR *dirp = 0;])],
                    [AC_VAR_SET(ac_Header, yes)],
                    [AC_VAR_SET(ac_Header, no)])])
-AC_SHELL_IFELSE([test AC_VAR_GET(ac_Header) = yes],
-                [$2], [$3])dnl
+AS_IFELSE([test AC_VAR_GET(ac_Header) = yes],
+          [$2], [$3])dnl
 AC_VAR_POPDEF([ac_Header])dnl
 ])# _AC_CHECK_HEADER_DIRENT
 
Index: autoconf.m4
===================================================================
RCS file: /cvs/autoconf/autoconf.m4,v
retrieving revision 1.11
diff -u -r1.11 autoconf.m4
--- autoconf.m4 2000/10/23 19:13:37 1.11
+++ autoconf.m4 2000/10/25 17:15:39
@@ -23,6 +23,9 @@
 # Do not sinclude acsite.m4 here, because it may not be installed
 # yet when Autoconf is frozen.
 # Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
+
+m4_include(shell.m4)
+
 m4_include(acversion.m4)
 m4_include(acgeneral.m4)
 m4_include(aclang.m4)
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/autoconf/tests/Makefile.am,v
retrieving revision 1.33
diff -u -r1.33 Makefile.am
--- tests/Makefile.am 2000/10/17 07:55:45 1.33
+++ tests/Makefile.am 2000/10/25 17:22:08
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in.
 
 ## Makefile for Autoconf testsuite.
-## Copyright (C) 2000 Free Software Foundation, Inc.
+## Copyright 2000 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -20,7 +20,8 @@
 
 AUTOMAKE_OPTIONS = gnits
 
-SUITE = base.m4 tools.m4 semantics.m4 torture.m4 syntax.m4 update.m4
+SUITE = m4sugar.m4 shell.m4 \
+        base.m4 tools.m4 semantics.m4 torture.m4 syntax.m4 update.m4
 
 # We don't actually distribute the testsuite, since one only
 # needs m4 to build it, m4 being required anyway to install Autoconf.
@@ -49,5 +50,5 @@
        cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
 
 CLEANFILES = debug-*.sh macro configure configure.in config.status \
-config.cache config.log config.h.in config.h
+             config.cache config.log config.h.in config.h
 DISTCLEANFILES = atconfig testsuite
Index: tests/base.m4
===================================================================
RCS file: /cvs/autoconf/tests/base.m4,v
retrieving revision 1.8
diff -u -r1.8 base.m4
--- tests/base.m4 2000/10/25 15:04:30 1.8
+++ tests/base.m4 2000/10/25 17:22:08
@@ -2,59 +2,11 @@
 
 cat <<EOF
 
-Base layer.
+Autoconf base layer.
 
 EOF
 
-## ------- ##
-## m4_wrap ##
-## ------- ##
-
-AT_SETUP(m4_wrap)
-
-# m4_wrap is used to display the help strings.  Also, check that
-# commas are not swallowed.  This can easily happen because of
-# m4-listification.
 
-AT_DATA(configure.in,
-[[AC_PLAIN_SCRIPT()dnl
-m4_wrap([Short string */], [   ], [/* ], 20)
-
-m4_wrap([Much longer string */], [   ], [/* ], 20)
-
-m4_wrap([Short doc.], [          ], [  --short ], 30)
-
-m4_wrap([Short doc.], [          ], [  --too-wide], 30)
-
-m4_wrap([Super long documentation.], [          ], [  --too-wide], 30)
-
-m4_wrap([First, second  , third, [,quoted]])
-]])
-
-AT_DATA(expout,
-[[/* Short string */
-
-/* Much longer
-   string */
-
-  --short Short doc.
-
-  --too-wide
-          Short doc.
-
-  --too-wide
-          Super long
-          documentation.
-
-First, second , third, [,quoted]
-]])
-
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir -o-], 0, expout)
-
-AT_CLEANUP()
-
-
-
 ## ------------ ##
 ## AC_REQUIRE.  ##
 ## ------------ ##
@@ -87,105 +39,6 @@
 AC_PLAIN_SCRIPT
 TEST1
 test -z "$test1" && exit 1
-exit 0
-]])
-
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
-AT_CHECK([./configure], 0)
-
-AT_CLEANUP(configure)
-
-
-## ------------------ ##
-## AC_SHELL_MKDIR_P.  ##
-## ------------------ ##
-
-# Build nested dirs.
-
-AT_SETUP(AC_SHELL_MKDIR_P)
-
-AT_DATA(configure.in,
-[[AC_PLAIN_SCRIPT
-pwd=`pwd`
-set -e
-# Absolute
-AC_SHELL_MKDIR_P($pwd/1/2/3/4/5/6)
-test -d $pwd/1/2/3/4/5/6 || exit 1
-# Relative
-AC_SHELL_MKDIR_P(a/b/c/d/e/f)
-test -d a/b/c/d/e/f || exit 1
-exit 0
-]])
-
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
-AT_CHECK([./configure], 0)
-
-AT_CLEANUP(configure 1 a)
-
-
-
-## ----------------------------------------- ##
-## AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED.  ##
-## ----------------------------------------- ##
-
-# Build nested dirs.
-
-AT_SETUP(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED)
-
-AT_DATA(configure.in,
-[[
-
-define([AC_SHELL_DIRNAME_TEST],
-[dir=`AC_SHELL_DIRNAME([$1])`
-test "$dir" = "$2" ||
-  echo "dirname($1) = $dir instead of $2" >&2])
-define([AC_SHELL_DIRNAME_SED_TEST],
-[dir=`AC_SHELL_DIRNAME_SED([$1])`
-test "$dir" = "$2" ||
-  echo "dirname_sed($1) = $dir instead of $2" >&2])
-
-AC_PLAIN_SCRIPT
-AC_SHELL_DIRNAME_TEST([//1],           [//])
-AC_SHELL_DIRNAME_TEST([/1],            [/])
-AC_SHELL_DIRNAME_TEST([./1],           [.])
-AC_SHELL_DIRNAME_TEST([../../2],       [../..])
-AC_SHELL_DIRNAME_TEST([//1/],          [//])
-AC_SHELL_DIRNAME_TEST([/1/],           [/])
-AC_SHELL_DIRNAME_TEST([./1/],          [.])
-AC_SHELL_DIRNAME_TEST([../../2],       [../..])
-AC_SHELL_DIRNAME_TEST([//1/3],         [//1])
-AC_SHELL_DIRNAME_TEST([/1/3],          [/1])
-AC_SHELL_DIRNAME_TEST([./1/3],         [./1])
-AC_SHELL_DIRNAME_TEST([../../2/3],     [../../2])
-AC_SHELL_DIRNAME_TEST([//1/3///],      [//1])
-AC_SHELL_DIRNAME_TEST([/1/3///],       [/1])
-AC_SHELL_DIRNAME_TEST([./1/3///],      [./1])
-AC_SHELL_DIRNAME_TEST([../../2/3///],  [../../2])
-AC_SHELL_DIRNAME_TEST([//1//3/],       [//1])
-AC_SHELL_DIRNAME_TEST([/1//3/],                [/1])
-AC_SHELL_DIRNAME_TEST([./1//3/],       [./1])
-AC_SHELL_DIRNAME_TEST([../../2//3/],   [../../2])
-
-AC_SHELL_DIRNAME_SED_TEST([//1],               [//])
-AC_SHELL_DIRNAME_SED_TEST([/1],                        [/])
-AC_SHELL_DIRNAME_SED_TEST([./1],               [.])
-AC_SHELL_DIRNAME_SED_TEST([../../2],           [../..])
-AC_SHELL_DIRNAME_SED_TEST([//1/],              [//])
-AC_SHELL_DIRNAME_SED_TEST([/1/],               [/])
-AC_SHELL_DIRNAME_SED_TEST([./1/],              [.])
-AC_SHELL_DIRNAME_SED_TEST([../../2],           [../..])
-AC_SHELL_DIRNAME_SED_TEST([//1/3],             [//1])
-AC_SHELL_DIRNAME_SED_TEST([/1/3],              [/1])
-AC_SHELL_DIRNAME_SED_TEST([./1/3],             [./1])
-AC_SHELL_DIRNAME_SED_TEST([../../2/3],         [../../2])
-AC_SHELL_DIRNAME_SED_TEST([//1/3///],          [//1])
-AC_SHELL_DIRNAME_SED_TEST([/1/3///],           [/1])
-AC_SHELL_DIRNAME_SED_TEST([./1/3///],          [./1])
-AC_SHELL_DIRNAME_SED_TEST([../../2/3///],      [../../2])
-AC_SHELL_DIRNAME_SED_TEST([//1//3/],           [//1])
-AC_SHELL_DIRNAME_SED_TEST([/1//3/],            [/1])
-AC_SHELL_DIRNAME_SED_TEST([./1//3/],           [./1])
-AC_SHELL_DIRNAME_SED_TEST([../../2//3/],       [../../2])
 exit 0
 ]])
 
Index: tests/suite.m4
===================================================================
RCS file: /cvs/autoconf/tests/suite.m4,v
retrieving revision 1.13
diff -u -r1.13 suite.m4
--- tests/suite.m4 2000/10/25 15:04:30 1.13
+++ tests/suite.m4 2000/10/25 17:24:17
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
 # Validation suite for Autoconf
 # Copyright 2000 Free Software Foundation, Inc.
 
@@ -17,7 +17,13 @@
 # Run the tests from the lowest level to the highest level, and from
 # the most selective to the easiest.
 
-# m4sugar.
+# M4sugar.
+AT_INCLUDE(m4sugar.m4)
+
+# shell.m4.
+AT_INCLUDE(shell.m4)
+
+# Autoconf base macros.
 AT_INCLUDE(base.m4)
 
 # The executables.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]