From 2dcb9962f4e5fc90ef50fa9094e04781a4d3a2d6 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 4 Aug 1996 19:56:00 +0000 Subject: [PATCH] More bug fixes --- ChangeLog | 8 ++++++++ automake.in | 34 ++++++++++++++++++++++++++-------- tests/ChangeLog | 2 ++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/comment.test | 12 ++++++++++++ 6 files changed, 50 insertions(+), 10 deletions(-) create mode 100755 tests/comment.test diff --git a/ChangeLog b/ChangeLog index d475fe21..df16c491 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Sun Aug 4 12:52:43 1996 Tom Tromey + * automake.in (handle_dist): Only generate `distdir' variable if + it doesn't already exist. + Fix for bug reported by Harlan Stenn. Test tags.test. * automake.in (initialize_per_input): Define dir_holds_sources. (handle_tags): Check dir_holds_headers. @@ -59,6 +62,11 @@ Tue Jun 18 10:53:54 1996 Tom Tromey * automake.in (handle_tests): Don't directly generate site.exp. +Sun Jun 16 22:21:16 1996 Harlan Stenn + + * automake.in: Treat an initial `#' on a word in AUTOMAKE_OPTIONS + as a comment start. Add support for a dist-tarZ target. + Mon Jun 10 21:11:20 1996 Tom Tromey * texinfo.tex: New version. diff --git a/automake.in b/automake.in index 843f351e..77c15c06 100755 --- a/automake.in +++ b/automake.in @@ -448,6 +448,8 @@ sub handle_options foreach (split (' ', $contents{'AUTOMAKE_OPTIONS'})) { + last if /^#/; + $options{$_} = 1; if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'foreign') { @@ -455,7 +457,8 @@ sub handle_options } elsif ($_ eq 'no-installman' || $_ eq 'ansi2knr' || $_ eq 'dist-shar' || $_ eq 'dist-zip' - || $_ eq 'dejagnu' || $_ eq 'no-installinfo') + || $_ eq 'dist-tarZ' || $_ eq 'dejagnu' + || $_ eq 'no-installinfo') { # Explicitly recognize these. } @@ -1289,18 +1292,25 @@ sub handle_dist # Put these things in rules section so it is easier for whoever # reads Makefile.in. - if ($relative_dir eq '.') + if (! &variable_defined ('distdir')) { - $output_rules .= "\n" . 'distdir = $(PACKAGE)-$(VERSION)' . "\n"; + if ($relative_dir eq '.') + { + $output_rules .= "\n" . 'distdir = $(PACKAGE)-$(VERSION)' . "\n"; + } + else + { + $output_rules .= ("\n" + . 'distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)' + . "\n"); + } } - else + if ($relative_dir ne '.') { - $output_rules .= ("\nsubdir = " . $relative_dir . "\n" - . 'distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)' - . "\n"); + $output_rules .= "\nsubdir = " . $relative_dir . "\n"; } - # Generate 'dist' target, and maybe dist-shar / dist-zip. + # Generate 'dist' target, and maybe dist-shar / dist-zip / dist-tarZ. if ($relative_dir eq '.') { # Rule to check whether a distribution is viable. @@ -1354,6 +1364,14 @@ distcheck: dist $output_rules .= 'zip -rq $(distdir).zip $(distdir)'; $output_rules .= "\n\t" . 'rm -rf $(distdir)' . "\n"; } + + if (defined $options{'dist-tarZ'}) + { + $output_rules .= 'dist-tarZ: distdir' . "\n\t"; + $output_rules .= 'chmod -R a+r $(distdir)' . "\n\t"; + $output_rules .= '$(TAR) choZf $(distdir).tar.Z $(distdir)'; + $output_rules .= "\n\t" . 'rm -rf $(distdir)' . "\n"; + } } # Generate distdir target. diff --git a/tests/ChangeLog b/tests/ChangeLog index f883fb9f..09207116 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,7 @@ Sun Aug 4 12:47:34 1996 Tom Tromey + * comment.test: New file. + * tags.test: New file. * vtexi2.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 436ff067..c589d2a6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,6 +10,6 @@ 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 texinfo.test dejagnu.test \ yacc.test mkinstall2.test texinfo2.test ansi.test depacl.test depacl2.test \ -error.test colon.test vtexi2.test tags.test +error.test colon.test vtexi2.test tags.test comment.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 4edc6289..1bfc80a3 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -48,7 +48,7 @@ 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 texinfo.test dejagnu.test \ yacc.test mkinstall2.test texinfo2.test ansi.test depacl.test depacl2.test \ -error.test colon.test vtexi2.test tags.test +error.test colon.test vtexi2.test tags.test comment.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(top_srcdir)/mkinstalldirs diff --git a/tests/comment.test b/tests/comment.test new file mode 100755 index 00000000..1d2b4f34 --- /dev/null +++ b/tests/comment.test @@ -0,0 +1,12 @@ +#! /bin/sh + +# Make sure that `#' as start of word in AUTOMAKE_OPTIONS means +# comment. + +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = #no such option +END + +$AUTOMAKE -- 2.43.5