]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
added new options
authorTom Tromey <tromey@redhat.com>
Sun, 28 Sep 1997 23:18:35 +0000 (23:18 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 28 Sep 1997 23:18:35 +0000 (23:18 +0000)
ChangeLog
TODO
automake.in
automake.texi
tests/cxxnoc.test

index b2cac0518182b948eb432b0696590ab91a229596..a3f80545df1c10d61490a2c28acb06953b9e7dab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 Sun Sep 28 15:55:46 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.in (handle_minor_options): New sub.
+       (check_gnits_standards): Don't handle README-alpha here.
+       (handle_dist_worker): Check NEWS file if `check-news' option
+       requested.
+       (generate_makefile): Run handle_minor_options.
+       (handle_options): Handle readme-alpha and check-news.  Set them if
+       --gnits.
+
        * depend.am (MKDEP): Use $(CC), not gcc.
 
 Wed Sep 24 23:48:26 1997  Tom Tromey  <tromey@cygnus.com>
diff --git a/TODO b/TODO
index efe3d3032c33b31099d903c8d2ea694373dd90cb..f7df486b7a865acc04f7fe51144dec4e86076388 100644 (file)
--- a/TODO
+++ b/TODO
@@ -48,6 +48,7 @@
 * cross-compilation support:
   programs built and used by the build process need to be
   built for CC_FOR_BUILD
+  introduce a new variable for this
 
 * if foo.y is a source, foo.h isn't auto-distributed?
 
index 1dff245b6a9c9dca584fa8e4aa038247de74b39d..e4c639fe985384453745f1e73d9bdcb401146a84 100755 (executable)
@@ -561,6 +561,7 @@ sub generate_makefile
     &handle_clean;
     &handle_phony;
 
+    &handle_minor_options;
     &check_typos;
 
     if (! -d ($output_directory . '/' . $am_relative_dir))
@@ -609,6 +610,12 @@ 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', ''))
@@ -628,7 +635,8 @@ sub handle_options
        elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
               || $_ eq 'dist-shar' || $_ eq 'dist-zip'
               || $_ eq 'dist-tarZ' || $_ eq 'dejagnu'
-              || $_ eq 'no-texinfo.tex')
+              || $_ eq 'no-texinfo.tex'
+              || $_ eq 'readme-alpha' || $_ eq 'check-news')
        {
            # Explicitly recognize these.
        }
@@ -2285,7 +2293,7 @@ sub handle_dist_worker
     # Initialization; only at top level.
     if ($relative_dir eq '.')
     {
-       if ($strictness >= $GNITS)
+       if (defined $options{'check-news'})
        {
            # For Gnits users, this is pretty handy.  Look at 15 lines
            # in case some explanatory text is desirable.
@@ -3803,6 +3811,30 @@ sub handle_emacs_lisp
     }
 }
 
+# Handle some of the minor options.
+sub handle_minor_options
+{
+    if (defined $options{'readme-alpha'})
+    {
+       if ($relative_dir eq '.')
+       {
+           if ($package_version !~ /^$GNITS_VERSION_PATTERN$/)
+           {
+               # FIXME: allow real filename.
+               &am_conf_line_error ('configure.in',
+                                    $package_version_line,
+                                    "version \`$package_version' doesn't follow Gnits standards");
+           }
+           elsif (defined $1 && -f 'README-alpha')
+           {
+               # This means we have an alpha release.  See
+               # GNITS_VERSION_PATTERN for details.
+               &require_file ($FOREIGN, 'README-alpha');
+           }
+       }
+    }
+}
+
 ################################################################
 
 # Scan one file for interesting things.  Subroutine of scan_configure.
@@ -4239,23 +4271,6 @@ sub check_gnits_standards
        {
            &am_error ("\`${relative_dir}/COPYING.LIB' disallowed by Gnits standards");
        }
-
-       if ($relative_dir eq '.')
-       {
-           if ($package_version !~ /^$GNITS_VERSION_PATTERN$/)
-           {
-               # FIXME: allow real filename.
-               &am_conf_line_error ('configure.in',
-                                    $package_version_line,
-                                    "version \`$package_version' doesn't follow Gnits standards");
-           }
-           elsif (defined $1 && -f 'README-alpha')
-           {
-               # This means we have an alpha release.  See
-               # GNITS_VERSION_PATTERN for details.
-               &require_file ($GNITS, 'README-alpha');
-           }
-       }
     }
 
     if ($relative_dir eq '.')
index 395428a6d3c833f6a5cd5c0df9b5d531381fa34e..514267e859bb17af80e0c8c9fb41f2dd14657629 100644 (file)
@@ -2203,22 +2203,8 @@ Various features of Automake can be controlled by options in the
 @item @code{gnits}
 @itemx @code{gnu}
 @itemx @code{foreign}
-Set the strictness as appropriate.
-
-@item @code{no-installman}
-The generated @file{Makefile.in} will not cause man pages to be
-installed by default.  However, an @code{install-man} target will still
-be available for optional installation.  This option is disallowed at
-@samp{GNU} strictness and above.
-@trindex install-man
-
-@item @code{no-installinfo}
-The generated @file{Makefile.in} will not cause info pages to be built
-or installed by default.  However, @code{info} and @code{install-info}
-targets will still be available.  This option is disallowed at
-@samp{GNU} strictness and above.
-@trindex info
-@trindex install-info
+Set the strictness as appropriate.  The @code{gnits} option also implies
+@code{readme-alpha} and @code{check-news}.
 
 @item @code{ansi2knr}
 @itemx @code{path/ansi2knr}
@@ -2228,6 +2214,10 @@ directory to find the @file{ansi2knr} program.  Generally the path
 should be a relative path to another directory in the same distribution
 (though Automake currently does not check this).
 
+@item @code{check-news}
+Cause @code{make dist} to fail unless the current version number appears
+in the first few lines of the @file{NEWS} file.
+
 @item @code{dejagnu}
 Cause @code{dejagnu}-specific rules to be generated.  @xref{Tests}.
 
@@ -2256,10 +2246,35 @@ is useful for those situations where you don't have the necessary bits
 to make automatic dependency tracking work @xref{Dependencies}.  In this
 case the effect is to effectively disable automatic dependency tracking.
 
+@item @code{no-installinfo}
+The generated @file{Makefile.in} will not cause info pages to be built
+or installed by default.  However, @code{info} and @code{install-info}
+targets will still be available.  This option is disallowed at
+@samp{GNU} strictness and above.
+@trindex info
+@trindex install-info
+
+@item @code{no-installman}
+The generated @file{Makefile.in} will not cause man pages to be
+installed by default.  However, an @code{install-man} target will still
+be available for optional installation.  This option is disallowed at
+@samp{GNU} strictness and above.
+@trindex install-man
+
 @item @code{no-texinfo.tex}
 Don't require @file{texinfo.tex}, even if there are texinfo files in
 this directory.
 
+@item @code{readme-alpha}
+If this release is an alpha release, and the file @file{README-alpha}
+exists, then it will be added to the distribution.  If this option is
+given, version numbers are expected to follow one of two forms.  The
+first form is @samp{@var{MAJOR}.@var{MINOR}.@var{ALPHA}}, where each
+element is a number; the final period and number should be left off for
+non-alpha releases.  The second form is
+@samp{@var{MAJOR}.@var{MINOR}@var{ALPHA}}, where @var{ALPHA} is a
+letter; it should be omitted for non-alpha releases.
+
 @item @var{version}
 A version number (eg @samp{0.30}) can be specified.  If Automake is not
 newer than the version specified, creation of the @file{Makefile.in}
index a4f5b00915e8fa4c0669d814f5b539e078be2e2b..558040d278536ba44fd62a5aae382c34e442e5e1 100755 (executable)
@@ -18,5 +18,5 @@ END
 
 $AUTOMAKE || exit 1
 
-grep CC Makefile.in && exit 1
+grep CC Makefile.in | grep -v MKDEP && exit 1
 exit 0