]> sourceware.org Git - automake.git/commitdiff
* tests/defs (ACLOCAL): Point to the installed aclocaldir is
authorAkim Demaille <akim@epita.fr>
Sun, 21 Oct 2001 18:03:19 +0000 (18:03 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 21 Oct 2001 18:03:19 +0000 (18:03 +0000)
libtool is required.
* tests/lex.test: Run AC_INIT once.
* tests/ldflags.test, tests/listval.test, tests/suffix2.test:
Libtool is required.
* tests/header.test: Built a correct configure.in.
* tests/defun2.test (configure.in): Be a bit respectful with
Autoconf, close the macro invocations.
* tests/confdeps.test: Even when not using aclocal, aclocal.m4
must be correct.
* automake.in (scan_autoconf_traces): Add support for
AC_CANONICAL_HOST, AC_CANONICAL_SYSTEM, A[CM]_PROG_LIBTOOL,
AM_CONFIG_HEADER, AM_MAINTAINER_MODE.
* tests/condincl.test (target): Better pattern, to avoid matching
the definition of `target_alias' which is now properly discovered
as an AC_SUBST by traces.
* cond4.test: Better grep pattern: After all, why shouldn't
TWO_FALSE be AC_SUBST properly.
* tests/installsh.test (AUTOMAKE, ACLOCAL): Adjust.

13 files changed:
ChangeLog
automake.in
tests/cond4.test
tests/condincl.test
tests/confdeps.test
tests/defs
tests/defun2.test
tests/header.test
tests/installsh.test
tests/ldflags.test
tests/lex.test
tests/listval.test
tests/suffix2.test

index cdcbbbd299e258ccb4833e9441ecf369d462b2cc..156816572ed6f221566689af87ecddeea20b5f89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2001-10-21  Akim Demaille  <akim@epita.fr>
+
+       * tests/defs (ACLOCAL): Point to the installed aclocaldir is
+       libtool is required.
+       * tests/lex.test: Run AC_INIT once.
+       * tests/ldflags.test, tests/listval.test, tests/suffix2.test:
+       Libtool is required.
+       * tests/header.test: Built a correct configure.in.
+       * tests/defun2.test (configure.in): Be a bit respectful with
+       Autoconf, close the macro invocations.
+       * tests/confdeps.test: Even when not using aclocal, aclocal.m4
+       must be correct.
+
+       * automake.in (scan_autoconf_traces): Add support for
+       AC_CANONICAL_HOST, AC_CANONICAL_SYSTEM, A[CM]_PROG_LIBTOOL,
+       AM_CONFIG_HEADER, AM_MAINTAINER_MODE.
+       * tests/condincl.test (target): Better pattern, to avoid matching
+       the definition of `target_alias' which is now properly discovered
+       as an AC_SUBST by traces.
+       * cond4.test: Better grep pattern: After all, why shouldn't
+       TWO_FALSE be AC_SUBST properly.
+       * tests/installsh.test (AUTOMAKE, ACLOCAL): Adjust.
+
 2001-10-20  Kevin Ryde <user42@zip.com.au>
 
        * lib/am/ansi2knr.am (mostlyclean-kr): Only rm *_.c when
        AC_CONFIG_AUX_DIR.
        * tests/alpha.test (configure.in): Automake wants a Makefile.
 
-       
 2001-10-20  Akim Demaille  <akim@epita.fr>
 
        * automake.in (scan_autoconf_traces): Use an unlikely to be used
        separator between trace arguments, in particular not `:' as it is
        within AC_CONFIG_FILES's $1.
 
-       
 2001-10-20  Akim Demaille  <akim@epita.fr>
 
        * tests/alpha.test (configure.in): Create, don't append.  A single
        AC_INIT is enough.
 
-       
 2001-10-20  Akim Demaille  <akim@epita.fr>
 
        * tests/acoutnoq.test, tests/acoutput.test, tests/acoutput2.test,
        AC_ARG_PROGRAM, AC_PROG_INSTALL and AC_PROG_MAKE_SET invocation
        since AM_INIT_AUTOMAKE requires them.
 
-       
 2001-10-20  Akim Demaille  <akim@epita.fr>
 
        * tests/defs (configure.in): Use credible AM_INIT_AUTOMAKE
        (&scan_autoconf_files): Using autoconf traces is no longer a
        complement of the previous ad hoc scheme: use either.
 
-       
 2001-10-20  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&scan_one_autoconf_file): `%generalize' is new, and
        factors dedicated $libsources assignments.
 
-       
 2001-10-20  Akim Demaille  <akim@epita.fr>
 
        * m4/error.m4, m4/obstack.m4, m4/ptrdiff.m4, m4/strtod.m4:
index 953bf691fb91e91a3732ce8d80625342a7f81358..b43dde5f2e8479e1a894fa0bdbb93061f879e1d4 100755 (executable)
@@ -4445,14 +4445,19 @@ sub scan_autoconf_traces ($)
   my ($filename) = @_;
 
   my @traced = (
+               'AC_CANONICAL_HOST',
+               'AC_CANONICAL_SYSTEM',
                'AC_CONFIG_AUX_DIR',
                'AC_CONFIG_FILES',
                'AC_LIBSOURCE',
+               'AC_PROG_LIBTOOL', 'AM_PROG_LIBTOOL',
                'AC_SUBST',
                'AM_CONDITIONAL',
+               'AM_CONFIG_HEADER',
                'AM_C_PROTOTYPES',
                'AM_GNU_GETTEXT',
                'AM_INIT_AUTOMAKE',
+               'AM_MAINTAINER_MODE',
                'AM_PROG_CC_C_O',
               );
 
@@ -4474,7 +4479,16 @@ sub scan_autoconf_traces ($)
       my $here = "$file:$line";
 
       # Alphabetical ordering please.
-      if ($macro eq 'AC_CONFIG_AUX_DIR')
+      if ($macro eq 'AC_CANONICAL_HOST')
+       {
+         $seen_canonical = $AC_CANONICAL_HOST
+           if ! $seen_canonical;
+       }
+      elsif ($macro eq 'AC_CANONICAL_SYSTEM')
+       {
+         $seen_canonical = $AC_CANONICAL_SYSTEM;
+       }
+      elsif ($macro eq 'AC_CONFIG_AUX_DIR')
        {
          @config_aux_path = $args[1];
          $config_aux_dir_set_in_configure_in = 1;
@@ -4496,10 +4510,33 @@ sub scan_autoconf_traces ($)
        {
          $configure_vars{$args[1]} = $here;
        }
+      elsif ($macro =~ /A(C|M)_PROG_LIBTOOL/)
+       {
+         $seen_libtool = $here;
+         $libtool_line = $line;
+       }
       elsif ($macro eq 'AM_CONDITIONAL')
        {
          $configure_cond{$args[1]} = $here;
        }
+      elsif ($macro eq 'AM_CONFIG_HEADER')
+       {
+         $config_header_line = $.;
+         foreach my $one_hdr (split (' ', $args[1]))
+           {
+             push (@config_fullnames, $one_hdr);
+             if ($one_hdr =~ /^([^:]+):(.+)$/)
+               {
+                 push (@config_names, $1);
+                 push (@config_headers, $2);
+               }
+             else
+               {
+                 push (@config_names, $one_hdr);
+                 push (@config_headers, $one_hdr . '.in');
+               }
+           }
+       }
       elsif ($macro eq 'AM_C_PROTOTYPES')
        {
          $am_c_prototypes = $here;
@@ -4515,6 +4552,10 @@ sub scan_autoconf_traces ($)
          $package_version_line = $line;
          $seen_init_automake = 1;
        }
+      elsif ($macro eq 'AM_MAINTAINER_MODE')
+       {
+         $seen_maint_mode = $here;
+       }
       elsif ($macro eq 'AM_PROG_CC_C_O')
        {
          $seen_cc_c_o = $here;
index 7ba79ad1ed6183eba5dc80f8a8e9890d7b90d4ff..c7cf043c568ed04eabf4ee9182db171c4f9c856d 100755 (executable)
@@ -34,7 +34,9 @@ $needs_autoconf
 
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
-test "`grep TWO_FALSE Makefile.in | wc -l`" -eq 0 || exit 1
+
+# We should not output useless definitions.
+test "`grep '^@TWO_FALSE@' Makefile.in | wc -l`" -eq 0 || exit 1
 
 $AUTOCONF || exit 1
 (gcc -v) > /dev/null 2>&1 || exit 77
index 22f0753d73f3308a20d0e123d9dd90ec7bc6d923..e55e10c58b5c8c6d4d1a0f5f516fa2627aa58aaa 100755 (executable)
@@ -22,8 +22,8 @@ END
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
 
-grep '^target' Makefile.in && exit 1
+grep '^target:' Makefile.in && exit 1
 
-grep '^@TOBE_TRUE@target' Makefile.in || exit 1
+grep '^@TOBE_TRUE@target:' Makefile.in || exit 1
 
 exit 0
index e6763f26aa232d6e6864c984b833ae59a30cd3f6..3ad6bb7e33b3e8c6eb6e8a1ee44a0cd83d6146e2 100755 (executable)
@@ -7,15 +7,17 @@
 echo "FOO = foo"        > Makefile.am
 set -e
 
-echo "$me: Not generated by aclocal..."
-echo "Hello, universe!" > aclocal.m4
-$AUTOMAKE
-grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
-
-
 echo "$me: Generated by aclocal..."
 $ACLOCAL
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in
 
+echo "$me: Not generated by aclocal..."
+# Pretend it is not from aclocal (remove the signature),
+# but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
+sed -n '3,$p' aclocal.m4 >aclocal.m4t
+mv aclocal.m4t aclocal.m4
+$AUTOMAKE
+grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
+
 exit 0
index c482eec5382c26899f2cfab3d57319fa96d86c29..de940809c9f27d279d3e13bd61763fce09cf8f6d 100644 (file)
@@ -1,4 +1,4 @@
-# -*- ksh -*-
+# -*- shell-script -*-
 # Defines for Automake testing environment.
 # Tom Tromey <tromey@cygnus.com>
 
@@ -10,6 +10,21 @@ test -f $srcdir/defs || {
 
 me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
 
+# See how redirections should work.  User can set VERBOSE to see all
+# output.
+test -z "$VERBOSE" && {
+   exec > /dev/null 2>&1
+}
+
+if test -n "$required"
+then
+  for tool in $required
+  do
+    echo "$me: running $tool --version"
+    ( $tool --version ) || exit 77
+  done
+fi
+
 # Always use an absolute srcdir.  Otherwise symlinks made in subdirs
 # of the test dir just won't work.
 case "$srcdir" in
@@ -34,20 +49,17 @@ cd ./testSubDir
 
 # Build appropriate environment in test directory.  Eg create
 # configure.in, touch all necessary files, etc.
+# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
+# still produces a valid configure.ac.  But then, tests running
+# config.status really need to append AC_OUTPUT.
 cat > configure.in << END
 AC_INIT
 AM_INIT_AUTOMAKE($me, 1.0)
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES(Makefile)
 END
 
-# See how redirections should work.  User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
-   exec > /dev/null 2>&1
-}
-
 # User can set PERL to change the perl interpreter used.
 test -z "$PERL" && PERL=perl
 
@@ -91,5 +103,17 @@ if test -z "$AUTOMAKE"; then
 fi
 
 # See how aclocal should be run.
-test -z "$ACLOCAL" \
-   && ACLOCAL="$PERL ../../aclocal --acdir=$srcdir/../m4"
+if test -z "$ACLOCAL"; then
+   perllibdir=$srcdir/../lib
+   export perllibdir
+   ACLOCAL="$PERL ../../aclocal --acdir=$srcdir/../m4"
+fi
+
+# We might need extra macros, e.g., from Libtool or Gettext.
+# Find them on the system.
+aclocaldir=`(aclocal --print-ac-dir) 2>/dev/null`
+case $required in
+  *libtool*)
+    ACLOCAL="$ACLOCAL -I $aclocaldir"
+    ;;
+esac
index 6f58cab629494315f65f8c31bf303b32d000a600..d51b301dbfd4828cdeb1136ebec836229e569306 100755 (executable)
@@ -8,7 +8,7 @@
 cat >> configure.in << 'END'
 dnl if buggy this will require getloadavg.c
 AC_PROG_CC
-AC_DEFUN([AC_FUNC_GETLOADAVG],
+AC_DEFUN([AC_FUNC_GETLOADAVG])
 dnl need this to avoid LIBOBJS used but not defined.
 AC_FUNC_MEMCMP
 END
index 106ff8c1a1d483168f741757e400860399889653..be4e57591f60fe09f24ebaf64c3e98f04b9756d4 100755 (executable)
@@ -5,13 +5,8 @@
 . $srcdir/defs || exit 1
 
 cat >> configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-PACKAGE=nonesuch
-VERSION=nonesuch
 AC_SUBST(MY_HEADERS)
 AC_PROG_CC
-AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
index 214f822ee597b2a8c553a4f435306fe4819296fc..ccd02dcc6f8ece2c3fe3977f91789f80438e39e2 100755 (executable)
@@ -25,7 +25,8 @@ case "$srcdir" in
     ;;
 esac
 
-AUTOMAKE="$PERL ../../../automake --libdir=$srcdir/../lib --foreign"
+AUTOMAKE="$PERL ../../../automake --libdir=$srcdir/../lib --foreign --Werror"
+ACLOCAL="$PERL ../../../aclocal --acdir=$srcdir/../m4"
 
 # Now we proceed with the test
 $ACLOCAL || exit 1
index 18f818da80c6abcff239f58194d273944bd3bbd9..47844623ab4d41ebb8eb02cab9229ecaf1400855 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Check for LDFLAGS in conditional.
 # PR 77.
-
+required=libtool
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
index 6fdfd23f367e92e005c34afee63e3dfa8a75f916..3ca4ec7c9d815658641a6173c5a09439959401a2 100755 (executable)
@@ -3,7 +3,6 @@
 . $srcdir/defs || exit 1
 
 cat >> configure.in << 'END'
-AC_INIT
 AC_PROG_CC
 AM_PROG_LEX
 END
index 824289c7b484b08cbcd595b1fce0931a0ddcbd42..ce9b074a252f38fc9f75957b39b1285d8af1505b 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Test to make sure variable is expanded properly.
 # From Adam J. Richter.
-
+required=libtool
 . $srcdir/defs || exit 1
 
 cat >> configure.in << 'END'
@@ -23,5 +23,5 @@ END
 : > config.guess
 : > config.sub
 
-$ACLOCAL || exit 1
+$ACLOCAL -I $aclocaldir || exit 1
 $AUTOMAKE
index 4348a8aa92a5a37a60e0226dd83359d5dd9c514e..0411c69bb3333b1f1cd8e0151f3b1e1c06f2607d 100755 (executable)
@@ -1,6 +1,7 @@
 #! /bin/sh
 
 # Test to make sure .c.o rule is only included once.
+required=libtoolize
 
 . $srcdir/defs || exit 1
 
@@ -27,7 +28,7 @@ END
 
 set -e
 
-$ACLOCAL || exit 1
+$ACLOCAL -I $aclocaldir || exit 1
 $AUTOMAKE -a
 
 grep -c '^\.c\.o:' Makefile.in   | grep '^1$'
This page took 0.054488 seconds and 5 git commands to generate.