From: Tom Tromey Date: Fri, 13 Feb 1998 04:10:54 +0000 (+0000) Subject: fixed readme-alpha bug X-Git-Tag: pre-depend-change~7 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=1a61b034814df83bb178b2b9c436c6bd9814d9ea;p=automake.git fixed readme-alpha bug --- diff --git a/ChangeLog b/ChangeLog index 088da765..d8e5b816 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Thu Feb 12 19:45:16 1998 Tom Tromey + * automake.in (handle_options): Set readme-alpha and check-news + for Gnits after main processing. Test alpha.test. From Jim + Meyering. + * aclocal.in (usage): Updated bug-reporting address. * automake.in (usage): Updated bug-reporting address. diff --git a/automake.in b/automake.in index 017eb28f..d4088763 100755 --- a/automake.in +++ b/automake.in @@ -610,73 +610,77 @@ sub generate_makefile # Handle AUTOMAKE_OPTIONS variable. Return 1 on error, 0 otherwise. sub handle_options { - if ($strictness == $GNITS) - { - $options{'readme-alpha'} = 1; - $options{'check-news'} = 1; - } - - return 0 if ! &variable_defined ('AUTOMAKE_OPTIONS'); - - foreach (&variable_value_as_list ('AUTOMAKE_OPTIONS', '')) + if (&variable_defined ('AUTOMAKE_OPTIONS')) { - $options{$_} = 1; - if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'foreign') - { - &set_strictness ($_); - } - elsif ($_ eq 'cygnus') - { - $cygnus_mode = 1; - } - elsif (/ansi2knr/) + foreach (&variable_value_as_list ('AUTOMAKE_OPTIONS', '')) { - # An option like "../lib/ansi2knr" is allowed. With no - # path prefix, we assume the required programs are in this - # directory. We save the actual option for later. - $options{'ansi2knr'} = $_; - } - elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo' - || $_ eq 'dist-shar' || $_ eq 'dist-zip' - || $_ eq 'dist-tarZ' || $_ eq 'dejagnu' - || $_ eq 'no-texinfo.tex' - || $_ eq 'readme-alpha' || $_ eq 'check-news') - { - # Explicitly recognize these. - } - elsif ($_ eq 'no-dependencies') - { - $use_dependencies = 0; - } - elsif (/([0-9]+)\.([0-9]+)/) - { - # Got a version number. Note that alpha releases count as - # the next higher release. Note also that we assume there - # will be a maximum of 100 minor releases for any given - # major release. - local ($rmajor, $rminor) = ($1, $2); - if ($VERSION !~ /([0-9]+)\.([0-9]+)([a-z])?/) + $options{$_} = 1; + if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'foreign') { - print STDERR - "automake: programming error: version is incorrect\n"; - exit 1; + &set_strictness ($_); + } + elsif ($_ eq 'cygnus') + { + $cygnus_mode = 1; + } + elsif (/ansi2knr/) + { + # An option like "../lib/ansi2knr" is allowed. With + # no path prefix, we assume the required programs are + # in this directory. We save the actual option for + # later. + $options{'ansi2knr'} = $_; } - local ($tmajor, $tminor) = ($1, $2); - # Handle alpha versions. - ++$tminor if defined $3; + elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo' + || $_ eq 'dist-shar' || $_ eq 'dist-zip' + || $_ eq 'dist-tarZ' || $_ eq 'dejagnu' + || $_ eq 'no-texinfo.tex' + || $_ eq 'readme-alpha' || $_ eq 'check-news') + { + # Explicitly recognize these. + } + elsif ($_ eq 'no-dependencies') + { + $use_dependencies = 0; + } + elsif (/([0-9]+)\.([0-9]+)/) + { + # Got a version number. Note that alpha releases + # count as the next higher release. Note also that we + # assume there will be a maximum of 100 minor releases + # for any given major release. + + local ($rmajor, $rminor) = ($1, $2); + if ($VERSION !~ /([0-9]+)\.([0-9]+)([a-z])?/) + { + print STDERR + "automake: programming error: version is incorrect\n"; + exit 1; + } + local ($tmajor, $tminor) = ($1, $2); + # Handle alpha versions. + ++$tminor if defined $3; - if ($rmajor > $tmajor || ($rmajor == $tmajor && $rminor > $tminor)) + if ($rmajor > $tmajor + || ($rmajor == $tmajor && $rminor > $tminor)) + { + &am_line_error ('AUTOMAKE_OPTIONS', + "require version $_, only have $VERSION"); + return 1; + } + } + else { &am_line_error ('AUTOMAKE_OPTIONS', - "require version $_, only have $VERSION"); - return 1; + 'option ', $_, 'not recognized'); } } - else - { - &am_line_error ('AUTOMAKE_OPTIONS', - 'option ', $_, 'not recognized'); - } + } + + if ($strictness == $GNITS) + { + $options{'readme-alpha'} = 1; + $options{'check-news'} = 1; } return 0; diff --git a/tests/ChangeLog b/tests/ChangeLog index e80a8700..24277537 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 12 21:00:34 1998 Tom Tromey + + * alpha.test: New file. + Wed Feb 11 17:28:30 1998 Tom Tromey * aclocal.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 3eb85c51..b983ccf2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,7 +27,7 @@ yaccpp.test texinfo3.test texinfo4.test tagsub.test cxxlibobj.test \ seenc.test cygwin32.test lisp.test stamph.test ldadd.test \ version2.test conf2.test cond.test cond2.test xsource.test \ libobj6.test depend3.test output5.test ammissing.test install.test \ -libobj7.test objc.test cond3.test cxxcpp.test aclocal.test +libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index f01473f8..56b66196 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -88,7 +88,7 @@ yaccpp.test texinfo3.test texinfo4.test tagsub.test cxxlibobj.test \ seenc.test cygwin32.test lisp.test stamph.test ldadd.test \ version2.test conf2.test cond.test cond2.test xsource.test \ libobj6.test depend3.test output5.test ammissing.test install.test \ -libobj7.test objc.test cond3.test cxxcpp.test aclocal.test +libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/alpha.test b/tests/alpha.test new file mode 100755 index 00000000..a3122a42 --- /dev/null +++ b/tests/alpha.test @@ -0,0 +1,28 @@ +#! /bin/sh + +# Make sure README-alpha is distributed when appropriate. Report from +# Jim Meyering. +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AM_INIT_AUTOMAKE(zardoz, 1.5e) +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = gnits +END + +: > README-alpha + +# Gnits stuff. +: > INSTALL +: > NEWS +: > README +: > COPYING +: > AUTHORS +: > ChangeLog +: > THANKS + +$AUTOMAKE || exit 1 + +grep README-alpha Makefile.in