* automake.in (handle_aclocal_m4): Use new MAINTAINER_MODE
authorTom Tromey <tromey@redhat.com>
Sat, 3 Oct 1998 18:26:55 +0000 (18:26 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 3 Oct 1998 18:26:55 +0000 (18:26 +0000)
conditional.
(handle_configure): Likewise.
(read_am_file): Likewise.
(file_contents_with_transform): Likewise.
(scan_one_configure_file): Recognize that AM_MAINTAINER_MODE
defines a conditional.
* automake.texi (Optional): Document new AM_MAINTAINER_MODE.
* texi-vers.am ($(srcdir)/@VTEXI@): Look at MAINTAINER_MODE
conditional.
(maintainer-clean-@VTI@): Likewise.
* remake.am ($(srcdir)/configure): Look at MAINTAINER_MODE
conditional.
* remake-hdr.am ($(srcdir)/@CONFIG_HEADER_IN@): Look at
MAINTAINER_MODE conditional.
* m4/maintainer.m4 (AM_MAINTAINER_MODE): Defined MAINTAINER_MODE
conditional.

13 files changed:
ChangeLog
NEWS
TODO
automake.in
automake.texi
lib/am/remake-hdr.am
lib/am/texi-vers.am
m4/maintainer.m4
remake-hdr.am
remake.am
stamp-vti
texi-vers.am
version.texi

index 2925418..e9eb482 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+Sat Oct  3 14:53:34 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * automake.in (handle_aclocal_m4): Use new MAINTAINER_MODE
+       conditional.
+       (handle_configure): Likewise.
+       (read_am_file): Likewise.
+       (file_contents_with_transform): Likewise.
+       (scan_one_configure_file): Recognize that AM_MAINTAINER_MODE
+       defines a conditional.
+       * automake.texi (Optional): Document new AM_MAINTAINER_MODE.
+       * texi-vers.am ($(srcdir)/@VTEXI@): Look at MAINTAINER_MODE
+       conditional.
+       (maintainer-clean-@VTI@): Likewise.
+       * remake.am ($(srcdir)/configure): Look at MAINTAINER_MODE
+       conditional.
+       * remake-hdr.am ($(srcdir)/@CONFIG_HEADER_IN@): Look at
+       MAINTAINER_MODE conditional.
+       * m4/maintainer.m4 (AM_MAINTAINER_MODE): Defined MAINTAINER_MODE
+       conditional.
+
 1998-10-03  Jim Blandy  <jimb@zwingli.cygnus.com>
 
        * depend2.am (%.lo): When editing the dependency file to add the
diff --git a/NEWS b/NEWS
index d9d1d2e..54e73e7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ New in 1.3b:
 * Can now put `.' in SUBDIRS to control build order
 * `include' command
 * Dependency tracking no long susceptible to deleted header file problem
+* Maintainer mode now a conditional.  @MAINT@ is now an anachronism.
 * Bug fixes
 \f
 New in 1.3:
diff --git a/TODO b/TODO
index 3a7d433..1d066a6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,8 +7,7 @@
 * reintroduce AM_FUNC_FNMATCH which sets LIBOBJS
   Then have automake know about fnmatch.h.
 
-* Reimplement maintainer mode to use conditionals
-  Also add a conditional for dependency tracking
+* Add a conditional for dependency tracking
 
 * Allow per-object cflags:
        bin_PROGRAMS = foo
index 70b408f..9b7da94 100755 (executable)
@@ -2770,7 +2770,9 @@ sub handle_aclocal_m4
     if ($regen_aclocal)
     {
        local (@ac_deps) = (
-                           ($seen_maint_mode ? "\@MAINT\@" : "") ,
+                           ($seen_maint_mode
+                            ? "\@MAINTAINER_MODE_TRUE\@"
+                            : "") ,
                            "configure.in",
                            ($acinclude ? ' acinclude.m4' : '')
                            );
@@ -2867,14 +2869,16 @@ sub handle_configure
 
     local (@rewritten) = &rewrite_inputs_into_dependencies (1,
                                                            @secondary_inputs);
-    # This rule remakes the Makefile.in.  Note use of @MAINT@ forces
-    # us to abandon pretty-printing.  Sigh.
+
+    # This rule remakes the Makefile.in.  Note use of
+    # @MAINTAINER_MODE_TRUE@ forces us to abandon pretty-printing.
+    # Sigh.
     $output_rules .= ($infile
                      # NOTE perl 5.003 (with -w) gives a
                      # uninitialized value error on the next line.
                      # Don't know why.
                      . ': '
-                     . ($seen_maint_mode ? '@MAINT@ ' : '')
+                     . ($seen_maint_mode ? '@MAINTAINER_MODE_TRUE@ ' : '')
                      . $amfile . ' '
                      . '$(top_srcdir)/configure.in $(ACLOCAL_M4)'
                       . ' ' . join (' ', @include_stack)
@@ -2932,7 +2936,7 @@ sub handle_configure
     {
        if ($iter =~ /Makefile\.in$/)
        {
-           $make_dirs{&dirname ($iterm)} = 1;
+           $make_dirs{&dirname ($iter)} = 1;
        }
     }
 
@@ -4141,7 +4145,11 @@ sub scan_one_configure_file
        }
 
         $seen_decl_yytext = 1 if /AC_DECL_YYTEXT/;
-        $seen_maint_mode = 1 if /AM_MAINTAINER_MODE/;
+       if (/AM_MAINTAINER_MODE/)
+       {
+           $seen_maint_mode = 1;
+           $configure_cond{'MAINTAINER_MODE'} = 1;
+       }
         $seen_package = 1 if /PACKAGE=/;
 
        # Skip VERSION of [$2]; that is from AM_INIT_AUTOMAKE.
@@ -5487,6 +5495,8 @@ sub read_am_file
        $_ .= "\n"
            unless substr ($_, -1, 1) eq "\n";
 
+       # Don't look at MAINTAINER_MODE_TRUE here.  That shouldn't be
+       # used by users.  @MAINT@ is an anachronism now.
        $_ =~ s/\@MAINT\@//g
            unless $seen_maint_mode;
 
@@ -6011,7 +6021,7 @@ sub file_contents_with_transform
 
     while (<FC_FILE>)
     {
-       $_ =~ s/\@MAINT\@//g
+       $_ =~ s/\@MAINTAINER_MODE_TRUE\@//g
            unless $seen_maint_mode;
 
        $had_chars = length ($_) && $_ ne "\n";
index a17ee27..c68c43a 100644 (file)
@@ -1014,7 +1014,8 @@ This macro adds a @samp{--enable-maintainer-mode} option to
 @code{configure}.  If this is used, @code{automake} will cause
 ``maintainer-only'' rules to be turned off by default in the generated
 @file{Makefile.in}s.  This macro is disallowed in @samp{Gnits} mode
-(@pxref{Gnits}).
+(@pxref{Gnits}).  This macro defines the @samp{MAINTAINER_MODE}
+conditional, which you can use in your own @file{Makefile.am}.
 @cvindex AM_MAINTAINER_MODE
 
 @item AC_SUBST
index 3315ebf..9161aea 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
             $(SHELL) ./config.status
        @echo timestamp > @STAMP@
 ## Explicitly look in srcdir for benefit of non-GNU makes.
-$(srcdir)/@CONFIG_HEADER_IN@: @MAINT@$(srcdir)/@STAMP@.in
+$(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@STAMP@.in
 $(srcdir)/@STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@
        cd $(top_srcdir) && $(AUTOHEADER)
        @echo timestamp > $(srcdir)/@STAMP@.in
index 5172cbe..30124ae 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-$(srcdir)/@VTEXI@: @MAINT@stamp-@VTI@
+$(srcdir)/@VTEXI@: @MAINTAINER_MODE_TRUE@stamp-@VTI@
        @:
 
 ## Depend on configure.in so that version number updates cause a
@@ -42,5 +42,5 @@ clean-@VTI@:
 distclean-@VTI@:
 
 maintainer-clean-@VTI@:
-       -@MAINT@rm -f stamp-@VTI@ @VTEXI@
+       -@MAINTAINER_MODE_TRUE@rm -f stamp-@VTI@ @VTEXI@
 
index 5d9a765..95f1386 100644 (file)
@@ -12,11 +12,8 @@ AC_DEFUN(AM_MAINTAINER_MODE,
       USE_MAINTAINER_MODE=$enableval,
       USE_MAINTAINER_MODE=no)
   AC_MSG_RESULT($USE_MAINTAINER_MODE)
-  if test $USE_MAINTAINER_MODE = yes; then
-    MAINT=
-  else
-    MAINT='#M#'
-  fi
+  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+  MAINT=$MAINTAINER_MODE_TRUE
   AC_SUBST(MAINT)dnl
 ]
 )
index 3315ebf..9161aea 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
             $(SHELL) ./config.status
        @echo timestamp > @STAMP@
 ## Explicitly look in srcdir for benefit of non-GNU makes.
-$(srcdir)/@CONFIG_HEADER_IN@: @MAINT@$(srcdir)/@STAMP@.in
+$(srcdir)/@CONFIG_HEADER_IN@: @MAINTAINER_MODE_TRUE@$(srcdir)/@STAMP@.in
 $(srcdir)/@STAMP@.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@
        cd $(top_srcdir) && $(AUTOHEADER)
        @echo timestamp > $(srcdir)/@STAMP@.in
index 486c3ce..14d82eb 100644 (file)
--- a/remake.am
+++ b/remake.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -20,5 +20,5 @@
 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
 ## Explicitly look in srcdir for benefit of non-GNU makes.
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
index 0415893..c14f931 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 28 September 1998
+@set UPDATED 3 October 1998
 @set EDITION 1.3c
 @set VERSION 1.3c
index 5172cbe..30124ae 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-$(srcdir)/@VTEXI@: @MAINT@stamp-@VTI@
+$(srcdir)/@VTEXI@: @MAINTAINER_MODE_TRUE@stamp-@VTI@
        @:
 
 ## Depend on configure.in so that version number updates cause a
@@ -42,5 +42,5 @@ clean-@VTI@:
 distclean-@VTI@:
 
 maintainer-clean-@VTI@:
-       -@MAINT@rm -f stamp-@VTI@ @VTEXI@
+       -@MAINTAINER_MODE_TRUE@rm -f stamp-@VTI@ @VTEXI@
 
index 0415893..c14f931 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 28 September 1998
+@set UPDATED 3 October 1998
 @set EDITION 1.3c
 @set VERSION 1.3c