automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-165-g861c198
Date: Mon, 01 Sep 2008 18:32:46 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=861c19856121d8e875e30268dee6033ded6fc7ae

The branch, master has been updated
       via  861c19856121d8e875e30268dee6033ded6fc7ae (commit)
      from  d6c6e48d7a9744b148214c1da60a1d47e9420139 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 861c19856121d8e875e30268dee6033ded6fc7ae
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Sep 1 20:29:58 2008 +0200

    Implement AM_MAINTAINER_MODE([DEFAULT-MODE]).
    
    * m4/maintainer.m4 (AM_MAINTAINER_MODE): Allow for an optional
    first argument of `enable' or `disable', setting the default.
    * doc/automake.texi (Optional, maintainer-mode): Document.
    * tests/mmode.test: New test.
    * tests/Makefile.am: Adjust.
    * NEWS: Update.
    Suggestion by Vincent Lefevre.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   11 ++++++++
 NEWS              |    3 ++
 doc/automake.texi |   35 +++++++++++++++------------
 m4/maintainer.m4  |   31 ++++++++++++++++--------
 tests/Makefile.am |    1 +
 tests/Makefile.in |    1 +
 tests/mmode.test  |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 124 insertions(+), 25 deletions(-)
 create mode 100755 tests/mmode.test

diff --git a/ChangeLog b/ChangeLog
index d49d630..a51a6e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-09-01  Ralf Wildenhues  <address@hidden>
+
+       Implement AM_MAINTAINER_MODE([DEFAULT-MODE]).
+       * m4/maintainer.m4 (AM_MAINTAINER_MODE): Allow for an optional
+       first argument of `enable' or `disable', setting the default.
+       * doc/automake.texi (Optional, maintainer-mode): Document.
+       * tests/mmode.test: New test.
+       * tests/Makefile.am: Adjust.
+       * NEWS: Update.
+       Suggestion by Vincent Lefevre.
+
 2008-08-31  Ralf Wildenhues  <address@hidden>
 
        Copyright year updates.
diff --git a/NEWS b/NEWS
index bd1f369..a2b336e 100644
--- a/NEWS
+++ b/NEWS
@@ -70,6 +70,9 @@ New in 1.10a:
     remove the file in a non-VPATH build.  Such setups work with Autoconf
     2.62 or newer.
 
+  - AM_MAINTAINER_MODE now allows for an optional argument specifying
+    the default setting.
+
 Bugs fixed in 1.10a:
 
 * Long standing bugs:
diff --git a/doc/automake.texi b/doc/automake.texi
index 265a3f8..0ea5780 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2863,14 +2863,16 @@ This macro specifies that the @file{intl/} subdirectory 
is to be built,
 even if the @code{AM_GNU_GETTEXT} macro was invoked with a first argument
 of @samp{external}.
 
address@hidden AM_MAINTAINER_MODE
address@hidden AM_MAINTAINER_MODE(@ovar{default-mode})
 @opindex --enable-maintainer-mode
-This macro adds a @option{--enable-maintainer-mode} option to
address@hidden --disable-maintainer-mode
+This macro adds an @option{--enable-maintainer-mode} option to
 @command{configure}.  If this is used, @command{automake} will cause
 ``maintainer-only'' rules to be turned off by default in the
-generated @file{Makefile.in}s.  This macro defines the
address@hidden conditional, which you can use in your own
address@hidden  @xref{maintainer-mode}.
+generated @file{Makefile.in}s, unless @var{default-mode} is
address@hidden  This macro defines the @code{MAINTAINER_MODE}
+conditional, which you can use in your own @file{Makefile.am}.
address@hidden
 
 @item m4_include
 Files included by @file{configure.ac} using this macro will be
@@ -9882,16 +9884,19 @@ the build continue is one of the arguments of the
 @cindex @code{AM_MAINTAINER_MODE}, purpose
 @acindex AM_MAINTAINER_MODE
 
address@hidden disables the so called "rebuild rules" by
-default.  If you have @code{AM_MAINTAINER_MODE} in
address@hidden, and run @samp{./configure && make}, then
address@hidden will *never* attempt to rebuilt @file{configure},
address@hidden, Lex or Yacc outputs, etc.  I.e., this disables
-build rules for files that are usually distributed and that users
-should normally not have to update.
-
-If you run @samp{./configure --enable-maintainer-mode}, then these
-rebuild rules will be active.
address@hidden allows to choose whether the so called
+"rebuild rules" should be enabled or disabled.  With
address@hidden([enable])}, they are enabled by default,
+otherwise they are disabled by default.  In the latter case, if
+you have @code{AM_MAINTAINER_MODE} in @file{configure.ac}, and run
address@hidden/configure && make}, then @command{make} will *never* attempt to
+rebuilt @file{configure}, @file{Makefile.in}s, Lex or Yacc outputs, etc.
+I.e., this disables build rules for files that are usually distributed
+and that users should normally not have to update.
+
+The user can override the default setting by passing either
address@hidden or @samp{--disable-maintainer-mode}
+to @command{configure}.
 
 People use @code{AM_MAINTAINER_MODE} either because they do want their
 users (or themselves) annoyed by timestamps lossage (@pxref{CVS}), or
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index 1c15c98..0b54e67 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -1,27 +1,38 @@
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&address@hidden: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions 
of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules 
and dependencies not useful
                          (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
+  AC_SUBST([MAINT])dnl
 ]
 )
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1e19657..6aa5d5c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -394,6 +394,7 @@ missing6.test \
 mkinstall.test \
 mkinst2.test \
 mkinst3.test \
+mmode.test \
 mmodely.test \
 multlib.test \
 nobase.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 969a57b..783ab8b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -545,6 +545,7 @@ missing6.test \
 mkinstall.test \
 mkinst2.test \
 mkinst3.test \
+mmode.test \
 mmodely.test \
 multlib.test \
 nobase.test \
diff --git a/tests/mmode.test b/tests/mmode.test
new file mode 100755
index 0000000..c067ccc
--- /dev/null
+++ b/tests/mmode.test
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 2008  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
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check for AM_MAINTAINER_MODE defaults.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_MAINTAINER_MODE
+AC_OUTPUT
+END
+
+: >Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure --help | grep 'enable-maintainer-mode.*enable make rules'
+./configure
+grep '^MAINT.*#' Makefile
+
+./configure --disable-maintainer-mode
+grep '^MAINT.*#' Makefile
+
+./configure --enable-maintainer-mode
+grep '^MAINT.*#' Makefile && exit 1
+
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in > configure.int
+mv -f configure.int configure.in
+mv configure configure1
+$AUTOCONF --force
+diff configure configure1
+
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in > configure.int
+mv -f configure.int configure.in
+$AUTOCONF --force
+
+./configure --help | grep 'disable-maintainer-mode.*disable make rules'
+./configure
+grep '^MAINT.*#' Makefile && exit 1
+
+./configure --enable-maintainer-mode
+grep '^MAINT.*#' Makefile && exit 1
+
+./configure --disable-maintainer-mode
+grep '^MAINT.*#' Makefile
+
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.in > configure.int
+mv -f configure.int configure.in
+$AUTOCONF --force -Werror && exit 1
+:


hooks/post-receive
--
GNU Automake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]