From: Tom Tromey Date: Sun, 2 Jun 1996 17:14:29 +0000 (+0000) Subject: Bug fixes. More dejagnu support X-Git-Tag: Release-1-1a~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fa2bf107b7965ac7d65f7cc1ff7fa3dd1cc1b38;p=thirdparty%2Fautomake.git Bug fixes. More dejagnu support --- diff --git a/ChangeLog b/ChangeLog index 961b6e3b9..b1bb4a99c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Sun Jun 2 10:33:10 1996 Tom Tromey + + * 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 * config.guess, config.sub: New versions. diff --git a/Makefile.in b/Makefile.in index 315a6787b..aee9c9536 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 b678bf30d..b25d7a464 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +New in 1.1: +* Bug fixes +* Better DejaGNU support + New in 1.0: * Bug fixes * distcheck target runs install and installcheck targets diff --git a/TODO b/TODO index f5785ee20..a065d34e8 100644 --- 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: diff --git a/automake.in b/automake.in index 5cda40a54..da1b76543 100755 --- a/automake.in +++ b/automake.in @@ -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' ); diff --git a/configure b/configure index 256caabca..98d7e8b30 100755 --- a/configure +++ b/configure @@ -519,7 +519,7 @@ cat >> confdefs.h <> confdefs.h < + + * dejagnu.test: New file. + + * texinfo.test: New file. + Thu May 23 09:58:48 1996 Tom Tromey * fpinst2.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 9dcf13cb7..549d4b5bd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) diff --git a/tests/Makefile.in b/tests/Makefile.in index 82f1e57aa..5afe4ff81 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 000000000..140ec07bc --- /dev/null +++ b/tests/dejagnu.test @@ -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 index 000000000..19e5f0ff3 --- /dev/null +++ b/tests/texinfo.test @@ -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' diff --git a/version.texi b/version.texi index 2b68efb7a..87c7f95e0 100644 --- a/version.texi +++ b/version.texi @@ -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