]> sourceware.org Git - automake.git/commitdiff
fixed readme-alpha bug
authorTom Tromey <tromey@redhat.com>
Fri, 13 Feb 1998 04:10:54 +0000 (04:10 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 13 Feb 1998 04:10:54 +0000 (04:10 +0000)
ChangeLog
automake.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/alpha.test [new file with mode: 0755]

index 088da765f51f465b53409c1b7af84ad10d8aea70..d8e5b816657ca2f49f95fe8991dffbee2567021d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Thu Feb 12 19:45:16 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * 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.
 
index 017eb28f58c0435e6922a43c22284d9a614766fa..d4088763a7eca1a25f96e9798c0c5a4c2d02ad44 100755 (executable)
@@ -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;
index e80a87003a144ca18dfd8ec91909cf0d7a5f3cd7..24277537ff8d100fa5eca97304d71e3f25d7c234 100644 (file)
@@ -1,3 +1,7 @@
+Thu Feb 12 21:00:34 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * alpha.test: New file.
+
 Wed Feb 11 17:28:30 1998  Tom Tromey  <tromey@cygnus.com>
 
        * aclocal.test: New file.
index 3eb85c5186036e79f83c89c2072a63e208eff7e6..b983ccf22c23769974ad558051df8d4ebcae7ab9 100644 (file)
@@ -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)
 
index f01473f834f68a5401e654e6af4a1a02f59bf53b..56b661961cb51d900b2e1659fbb754a98c2a0095 100644 (file)
@@ -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 (executable)
index 0000000..a3122a4
--- /dev/null
@@ -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
This page took 0.055176 seconds and 5 git commands to generate.