]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Bug fixes. More dejagnu support
authorTom Tromey <tromey@redhat.com>
Sun, 2 Jun 1996 17:14:29 +0000 (17:14 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 2 Jun 1996 17:14:29 +0000 (17:14 +0000)
13 files changed:
ChangeLog
Makefile.in
NEWS
TODO
automake.in
configure
configure.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/dejagnu.test [new file with mode: 0755]
tests/texinfo.test [new file with mode: 0755]
version.texi

index 961b6e3b9ccd3073a0c7705c87be9de34d2895b9..b1bb4a99c5c482a3c44679075b1637096fc75d6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Sun Jun  2 10:33:10 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * automake.in (initialize_global_constants): Removed version.texi
+       from common_sometimes.
+       (initialize_global_constants): Added texinfo.tex to common_files.
+       Test texinfo.test.
+       (handle_tests): Allow dejagnu- and automake-style test suites to
+       coexist.  Test dejagnu.test.
+       (initialize_global_constants): New constants AC_CANONICAL_HOST,
+       AC_CANONICAL_SYSTEM.
+       (scan_configure): Use new constants.
+       (handle_tests): Put target specific information into site.exp if
+       AC_CANONICAL_* used.
+       (read_am_file): Generate some extra variables when AC_CANONICAL_*
+       used.
+       (handle_options): Allow version number to have letters appended.
+
 Wed May 29 10:35:01 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * config.guess, config.sub: New versions.
index 315a6787b3d5a3fa666e9244eb11358d6e3615df..aee9c9536e642224461dbaea3fcc549af72209cf 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 0.34 from Makefile.am
+# Makefile.in generated automatically by automake 1.0 from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
diff --git a/NEWS b/NEWS
index b678bf30d52decc8b47dc437fb3ecb51f12d30f6..b25d7a4642d69a1ab9b345b6c83b98c80220fe17 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+New in 1.1:
+* Bug fixes
+* Better DejaGNU support
+\f
 New in 1.0:
 * Bug fixes
 * distcheck target runs install and installcheck targets
diff --git a/TODO b/TODO
index f5785ee2088a17a511ecc300cb221f0b0f9309f0..a065d34e8f493eb4321d130497d65dd061ca159a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,10 @@
 Priorities for release:
   [ none ]
 
+consider supporting "var+= stuff" syntax.  rewrite to just var=... on
+output.  This is sometimes convenient when you want to write a
+Makefile.am in more-or-less modular parts
+
 dejagnu support:
 * create site.exp based on known things: tool, srcdir, objdir,
   maybe host_alias, host_triplet, target_alias, target_triplet,
@@ -278,6 +282,8 @@ document rebuilding configure.  CONFIGURE_DEPENDENCIES
 
 document TAGS_DEPENDENCIES
 
+document new variables introduced when AC_CANONICAL_* used
+
 ================================================================
 
 Libraries:
index 5cda40a54cfc1118cd908e2b6bac875f469cd1d7..da1b76543827eaa171abd33d8221bec54cf2ca07 100755 (executable)
@@ -442,6 +442,8 @@ sub handle_options
        elsif (/[0-9]+\.?[0-9]+/)
        {
            # Got a version number.  Is the syntax too strict?
+           local ($num_version);
+           ($num_version = $VERSION) =~ tr/0-9//d;
            if ($VERSION < $_)
            {
                &am_line_error ('AUTOMAKE_OPTIONS',
@@ -1906,9 +1908,45 @@ sub handle_tests
     {
        push (@check, 'check-DEJAGNU');
        push (@phony, 'check-DEJAGNU');
-       $output_rules .= &file_contents ('dejagnu');
+       $output_rules .= &file_contents ('dejagnu') . "\n";
+       $output_rules .= ("site.exp: Makefile\n"
+                         . "\t\@echo 'Making a new site.exp file...'\n"
+                         . "\t-\@rm -f site.bak\n"
+                         . "\t-\@mv site.exp site.bak\n"
+                         . "\t\@echo '## these variables are automatically generated by make ##' > site.exp\n"
+                         . "\t\@echo '# Do not edit here.  If you wish to override these values' >> site.exp\n"
+                         . "\t\@echo '# edit the last section' >> site.exp\n"
+                         . "\t\@echo 'set tool \$(DEJATOOL)' >> site.exp\n"
+                         . "\t\@echo 'set srcdir \$(srcdir)' >> site.exp\n"
+                         . "\t\@echo 'set objdir \`pwd\`' >> site.exp\n");
+
+       # Extra stuff for AC_CANONICAL_*
+       local (@whatlist) = ();
+       if ($seen_canonical)
+       {
+           push (@whatlist, 'host')
+       }
+
+       # Extra stuff only for AC_CANONICAL_SYSTEM.
+       if ($seen_canonical == $AC_CANONICAL_SYSTEM)
+       {
+           push (@whatlist, 'target', 'build');
+       }
+
+       local ($c1, $c2);
+       foreach $c1 (@whatlist)
+       {
+           foreach $c2 ('alias', 'triplet')
+           {
+               $output_rules .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})' >> site.exp\n";
+           }
+       }
+
+       $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> site.exp\n"
+                         . "\t-\@sed '1,/^## All variables above are.*##/ d' site.bak >> site.exp\n");
     }
-    elsif (&variable_defined ('TESTS'))
+
+    if (&variable_defined ('TESTS'))
     {
        push (@check, 'check-TESTS');
        push (@phony, 'check-TESTS');
@@ -2074,7 +2112,12 @@ sub scan_configure
            }
        }
 
-       $seen_canonical = 1 if /AC_CANONICAL_(HOST|SYSTEM)/;
+        # Handle AC_CANONICAL_*.  Always allow upgrading to
+        # AC_CANONICAL_SYSTEM, but never downgrading.
+       $seen_canonical = $AC_CANONICAL_HOST
+           if ! $seen_canonical && /AC_CANONICAL_HOST/;
+        $seen_canonical = $AC_CANONICAL_SYSTEM if /AC_CANONICAL_SYSTEM/;
+
        $seen_canonical = 1 if /AC_CHECK_TOOL/;
        $seen_path_xtra = 1 if /AC_PATH_XTRA/;
 
@@ -2250,6 +2293,20 @@ sub read_am_file
            ('s/\@top_builddir\@/' . $build_rx . '/g',
             'header-vars');
 
+    # Generate some useful variables when AC_CANONICAL_* used.
+    if ($seen_canonical)
+    {
+       $header_vars .= ('host_alias = @host_alias@' . "\n"
+                        . 'host_triplet = @host@' . "\n");
+       if ($seen_canonical == $AC_CANONICAL_SYSTEM)
+       {
+           $header_vars .= ('build_alias = @build_alias@' . "\n"
+                            . 'build_triplet = @build@' . "\n");
+           $header_vars .= ('target_alias = @target_alias@' . "\n"
+                            . 'target_triplet = @target@' . "\n");
+       }
+    }
+
     open (AM_FILE, $amfile) || die "automake: couldn't open \`$amfile': $!\n";
     print "automake: reading $amfile\n" if $verbose;
 
@@ -2396,6 +2453,10 @@ sub read_am_file
 
 sub initialize_global_constants
 {
+    # Values for AC_CANONICAL_*
+    $AC_CANONICAL_HOST = 1;
+    $AC_CANONICAL_SYSTEM = 2;
+
     # Associative array of standard directory names.  Entry is TRUE if
     # corresponding directory should be installed during
     # 'install-exec' phase.
@@ -2436,13 +2497,14 @@ sub initialize_global_constants
         "README", "THANKS", "TODO", "NEWS", "COPYING", "COPYING.LIB",
         "INSTALL", "ABOUT-NLS", "ChangeLog", "configure", "configure.in",
         "config.guess", "config.sub", "AUTHORS", "BACKLOG", "ABOUT-GNU",
-        "libversion.in", "mdate-sh", "mkinstalldirs", "install-sh"
+        "libversion.in", "mdate-sh", "mkinstalldirs", "install-sh",
+        'texinfo.tex'
         );
 
     # Commonly used files we auto-include, but only sometimes.
     @common_sometimes =
        (
-        "version.texi", "aclocal.m4", "acconfig.h", "config.h.top",
+        "aclocal.m4", "acconfig.h", "config.h.top",
         "config.h.bot", "stamp-h.in", "ansi2knr.c",
         "ansi2knr.1", 'stamp-vti'
         );
index 256caabca4370bb05c847ff855dc0df92822c9ea..98d7e8b30c6c404fcdebc93bb829b63a3a593f54 100755 (executable)
--- a/configure
+++ b/configure
@@ -519,7 +519,7 @@ cat >> confdefs.h <<EOF
 #define PACKAGE "$PACKAGE"
 EOF
 
-VERSION=1.0
+VERSION=1.1a
 
 cat >> confdefs.h <<EOF
 #define VERSION "$VERSION"
index d4e41c0340df65fa4ab29ca59b61d015d39dbf36..146fc7d961425702c2c6efef355c76eeb2596dc8 100644 (file)
@@ -6,7 +6,7 @@ dnl AC_CONFIG_HEADER(config.h)
 PACKAGE=automake
 AC_SUBST(PACKAGE)
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-VERSION=1.0
+VERSION=1.1a
 AC_SUBST(VERSION)
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
 ALL_LINGUAS=
index 7b49b1988e42201bd7af8f82838a03997916603a..912a411f2517ce66a3fb84d79e9d6a85179bc1e2 100644 (file)
@@ -1,3 +1,9 @@
+Sun Jun  2 09:04:52 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * dejagnu.test: New file.
+
+       * texinfo.test: New file.
+
 Thu May 23 09:58:48 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * fpinst2.test: New file.
index 9dcf13cb75d8e75eebd6c3d9626a19d4c798e241..549d4b5bdd74c17697404cc0bd6455b332b4ad15 100644 (file)
@@ -8,6 +8,6 @@ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \
 canon.test installsh.test empty.test rulepat.test insh.test canon2.test \
 target.test extra.test noinst.test instman.test mkinstall.test auxdir.test \
 canon3.test mdate2.test subdir.test backsl.test package.test number.test \
-insh2.test outdir.test fpinstall.test fpinst2.test
+insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test
 
 EXTRA_DIST = defs $(TESTS)
index 82f1e57aa378c1a365361b931b9b212e0de2f0ca..5afe4ff813f6f942af8abb159348d923edf1eab5 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 0.34 from Makefile.am
+# Makefile.in generated automatically by automake 1.0 from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -46,7 +46,7 @@ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \
 canon.test installsh.test empty.test rulepat.test insh.test canon2.test \
 target.test extra.test noinst.test instman.test mkinstall.test auxdir.test \
 canon3.test mdate2.test subdir.test backsl.test package.test number.test \
-insh2.test outdir.test fpinstall.test fpinst2.test
+insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(top_srcdir)/mkinstalldirs
diff --git a/tests/dejagnu.test b/tests/dejagnu.test
new file mode 100755 (executable)
index 0000000..140ec07
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+# Test to make sure dejagnu tests and automake-style tests can coexist.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = dejagnu
+TESTS = frob.test
+END
+
+: > frob.test
+
+$AUTOMAKE || exit 1
+
+grep '^check-TESTS' Makefile.in && grep '^check-DEJAGNU' Makefile.in
diff --git a/tests/texinfo.test b/tests/texinfo.test
new file mode 100755 (executable)
index 0000000..19e5f0f
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+# Test to ensure texinfo.tex included in distribution.  Bug report by
+# Jim Meyering.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = textutils.texi
+magic:
+       @echo $(DISTFILES)
+END
+
+: > textutils.texi
+: > texinfo.tex
+
+$AUTOMAKE || exit 1
+
+make -s -f Makefile.in magic | grep 'texinfo\.tex'
index 2b68efb7abbc6fc3842d96b48d9cad36e00aa119..87c7f95e0e84285564a6b6183d6f8867649cfe19 100644 (file)
@@ -1,3 +1,3 @@
 @set UPDATED 25 May 1996
-@set EDITION 1.0
-@set VERSION 1.0
+@set EDITION 1.1a
+@set VERSION 1.1a