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-218-g96cda9c
Date: Mon, 03 Nov 2008 21:58:13 +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=96cda9c82224e6609b7ddbde89b43a91eddf2fed

The branch, master has been updated
       via  96cda9c82224e6609b7ddbde89b43a91eddf2fed (commit)
      from  370b583ea8bc23d9d805fb9ec5ea97526a23331d (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 96cda9c82224e6609b7ddbde89b43a91eddf2fed
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Nov 3 22:56:22 2008 +0100

    New public macro AM_SUBST_NOTMAKE.
    
    * m4/substnot.m4 (AM_SUBST_NOTMAKE): New public macro; invoke
    _AM_SUBST_NOTMAKE with arguments.
    * doc/automake.texi (Optional): Document it.
    * NEWS: Update.
    * tests/subst4.test: New test.
    * tests/Makefile.am: Update.
    Suggestion by Bruno Haible.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                           |    9 +++++++++
 NEWS                                |    3 +++
 doc/automake.texi                   |   14 +++++++++++++-
 m4/substnot.m4                      |    9 ++++++++-
 tests/Makefile.am                   |    1 +
 tests/Makefile.in                   |    1 +
 tests/{nodist2.test => subst4.test} |   32 ++++++++++++++++++++------------
 7 files changed, 55 insertions(+), 14 deletions(-)
 copy tests/{nodist2.test => subst4.test} (72%)

diff --git a/ChangeLog b/ChangeLog
index ef3b8f3..a6c63a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-11-03  Ralf Wildenhues  <address@hidden>
 
+       New public macro AM_SUBST_NOTMAKE.
+       * m4/substnot.m4 (AM_SUBST_NOTMAKE): New public macro; invoke
+       _AM_SUBST_NOTMAKE with arguments.
+       * doc/automake.texi (Optional): Document it.
+       * NEWS: Update.
+       * tests/subst4.test: New test.
+       * tests/Makefile.am: Update.
+       Suggestion by Bruno Haible.
+
        Fix regression introduced by AM_DEFAULT_SOURCE_EXT.
        * automake.in (handle_source_transform): Use the right variable
        when determining whether to apply the old rule for the libtool
diff --git a/NEWS b/NEWS
index 5c7d295..4834165 100644
--- a/NEWS
+++ b/NEWS
@@ -114,6 +114,9 @@ New in 1.10a:
   - AM_MAINTAINER_MODE now allows for an optional argument specifying
     the default setting.
 
+  - AM_SUBST_NOTMAKE may prevent substitution of AC_SUBSTed variables,
+    useful especially for multi-line values.
+
 Bugs fixed in 1.10a:
 
 * Long standing bugs:
diff --git a/doc/automake.texi b/doc/automake.texi
index acb97cd..40b5b5d 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2896,7 +2896,8 @@ The Autoconf Manual}.
 
 @item AC_SUBST
 The first argument is automatically defined as a variable in each
-generated @file{Makefile.in}.  @xref{Setting Output Variables, , Setting
+generated @file{Makefile.in}, unless @code{AM_SUBST_NOTMAKE} is also
+used for this variable.  @xref{Setting Output Variables, , Setting
 Output Variables, autoconf, The Autoconf Manual}.
 
 If the Autoconf manual says that a macro calls @code{AC_SUBST} for
@@ -2941,6 +2942,17 @@ generated @file{Makefile.in}s, unless @var{default-mode} 
is
 conditional, which you can use in your own @file{Makefile.am}.
 @xref{maintainer-mode}.
 
address@hidden AM_SUBST_NOTMAKE(@var{var})
+Prevent Automake from defining a variable @var{var}, even if it is
+substituted by @command{config.status}.  Normally, Automake defines a
address@hidden variable for each @command{configure} substitution,
+i.e., for each @code{AC_SUBST(address@hidden)}.  This macro prevents that
+definition from Automake.  If @code{AC_SUBST} has not been called
+for this variable, then @code{AM_SUBST_NOTMAKE} has no effects.
+Preventing variable definitions may be useful for substitution of
+multi-line values, where @address@hidden = @@@var{value}@@} might yield
+unintended results.
+
 @item m4_include
 Files included by @file{configure.ac} using this macro will be
 detected by Automake and automatically distributed.  They will also
diff --git a/m4/substnot.m4 b/m4/substnot.m4
index 5958962..811d286 100644
--- a/m4/substnot.m4
+++ b/m4/substnot.m4
@@ -1,12 +1,19 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 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 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fa2b9a8..52c37c5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -574,6 +574,7 @@ subpkg3.test \
 subst.test \
 subst2.test \
 subst3.test \
+subst4.test \
 substref.test \
 substre2.test \
 substtarg.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index f063770..04d205c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -727,6 +727,7 @@ subpkg3.test \
 subst.test \
 subst2.test \
 subst3.test \
+subst4.test \
 substref.test \
 substre2.test \
 substtarg.test \
diff --git a/tests/nodist2.test b/tests/subst4.test
similarity index 72%
copy from tests/nodist2.test
copy to tests/subst4.test
index 80a89c7..02e46bd 100755
--- a/tests/nodist2.test
+++ b/tests/subst4.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2007  Free Software Foundation, Inc.
+# 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
@@ -14,25 +15,32 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure nodist_noinst_HEADERS work.
-# For PR 249.
+# Test AM_SUBST_NOTMAKE.
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in <<'EOF'
+myrule="\
+foo: bar
+       echo making \$@ from bar
+       echo \$@ > \$@
+"
+AC_SUBST([myrule])
+AM_SUBST_NOTMAKE([myrule])
 AC_OUTPUT
 EOF
 
-cat > Makefile.am << 'EOF'
-nodist_noinst_HEADERS = baz.h
+cat > Makefile.am <<'EOF'
address@hidden@
 EOF
-
-: > baz.h
-
-set -e
+: > bar
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
-./configure --prefix "`pwd`/install"
-$MAKE install-data
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f foo
+:


hooks/post-receive
--
GNU Automake




reply via email to

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