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-151-g3010508
Date: Tue, 17 Jun 2008 22:14: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=30105086b1ee8176f5e7a5304a1ecf5ee6e60e3f

The branch, master has been updated
       via  30105086b1ee8176f5e7a5304a1ecf5ee6e60e3f (commit)
      from  0a7e5fe47745de5269bf1467bda697ab86d01217 (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 30105086b1ee8176f5e7a5304a1ecf5ee6e60e3f
Author: Ralf Wildenhues <address@hidden>
Date:   Wed Jun 18 00:11:36 2008 +0200

    For AC_CONFIG_LINKS(X,X), do not clean X in a non-VPATH build.
    
    * automake.in (rewrite_inputs_into_dependencies): Do distribute
    inputs where input and output name are equal.  This relies on
    the assumption that it only happens with AC_CONFIG_LINKS.
    (handle_configure) <CONFIG_CLEAN_VPATH_FILES>: New variable, for
    links where source and dest are equal.
    * lib/am/clean.am (distclean-generic): Remove, if build tree not
    equal source tree.
    * tests/conflnk4.test: New test.
    * tests/Makefile.am: Adjust.
    * NEWS: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                      |   14 ++++++
 Makefile.in                    |    2 +
 NEWS                           |    4 ++
 automake.in                    |   17 ++++++-
 doc/Makefile.in                |    2 +
 lib/Automake/Makefile.in       |    2 +
 lib/Automake/tests/Makefile.in |    2 +
 lib/Makefile.in                |    2 +
 lib/am/Makefile.in             |    2 +
 lib/am/clean.am                |    3 +-
 m4/Makefile.in                 |    2 +
 tests/Makefile.am              |    1 +
 tests/Makefile.in              |    3 +
 tests/conflnk4.test            |   96 ++++++++++++++++++++++++++++++++++++++++
 14 files changed, 148 insertions(+), 4 deletions(-)
 create mode 100755 tests/conflnk4.test

diff --git a/ChangeLog b/ChangeLog
index 4f0a809..927437d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-06-18  Ralf Wildenhues  <address@hidden>
+
+       For AC_CONFIG_LINKS(X,X), do not clean X in a non-VPATH build.
+       * automake.in (rewrite_inputs_into_dependencies): Do distribute
+       inputs where input and output name are equal.  This relies on
+       the assumption that it only happens with AC_CONFIG_LINKS.
+       (handle_configure) <CONFIG_CLEAN_VPATH_FILES>: New variable, for
+       links where source and dest are equal.
+       * lib/am/clean.am (distclean-generic): Remove, if build tree not
+       equal source tree.
+       * tests/conflnk4.test: New test.
+       * tests/Makefile.am: Adjust.
+       * NEWS: Update.
+
 2008-06-06  Ralf Wildenhues  <address@hidden>
 
        * doc/automake.texi (Extending): Fix ambivalent wording.
diff --git a/Makefile.in b/Makefile.in
index fb1b8c1..c9792af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -51,6 +51,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache 
config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(bin_SCRIPTS)
@@ -609,6 +610,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/NEWS b/NEWS
index 4230abb..181ba05 100644
--- a/NEWS
+++ b/NEWS
@@ -63,6 +63,10 @@ New in 1.10a:
   - New macro AM_COND_IF for conditional evaluation and conditional
     config files.
 
+  - For AC_CONFIG_LINKS, if source and destination are equal, do not
+    remove the file in a non-VPATH build.  Such setups work with Autoconf
+    2.62 or newer.
+
 Bugs fixed in 1.10a:
 
 * Long standing bugs:
diff --git a/automake.in b/automake.in
index 68647e9..dc431fe 100755
--- a/automake.in
+++ b/automake.in
@@ -3936,7 +3936,7 @@ sub prepend_srcdir (@)
 # Compute a list of dependencies appropriate for the rebuild
 # rule of
 #   AC_CONFIG_FILES($OUTPUT:$INPUT[0]:$INPUTS[1]:...)
-# Also distribute $INPUTs which are not build by another AC_CONFIG_FILES.
+# Also distribute $INPUTs which are not built by another AC_CONFIG_FOOS.
 sub rewrite_inputs_into_dependencies ($@)
 {
   my ($file, @inputs) = @_;
@@ -3947,7 +3947,7 @@ sub rewrite_inputs_into_dependencies ($@)
       # We cannot create dependencies on shell variables.
       next if (substitute_ac_subst_variables $i) =~ /\$/;
 
-      if (exists $ac_config_files_location{$i})
+      if (exists $ac_config_files_location{$i} && $i ne $file)
        {
          my $di = dirname $i;
          if ($di eq $relative_dir)
@@ -4152,6 +4152,8 @@ sub handle_configure ($$$@)
   # Now look for other files in this directory which must be remade
   # by config.status, and generate rules for them.
   my @actual_other_files = ();
+  # These get cleaned only in a VPATH build.
+  my @actual_other_vpath_files = ();
   foreach my $lfile (@other_input_files)
     {
       my $file;
@@ -4242,7 +4244,14 @@ sub handle_configure ($$$@)
                  $local = undef;
                }
            }
-         push @actual_other_files, $local if $local;
+         if ($file ne $link)
+           {
+             push @actual_other_files, $local if $local;
+           }
+         else
+           {
+             push @actual_other_vpath_files, $local if $local;
+           }
        }
 
       # Do not process sources that contain shell variables.
@@ -4267,6 +4276,8 @@ sub handle_configure ($$$@)
   # These files get removed by "make distclean".
   define_pretty_variable ('CONFIG_CLEAN_FILES', TRUE, INTERNAL,
                          @actual_other_files);
+  define_pretty_variable ('CONFIG_CLEAN_VPATH_FILES', TRUE, INTERNAL,
+                         @actual_other_vpath_files);
 }
 
 # Handle C headers.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 5f5dc8e..f4b2249 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -50,6 +50,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 INFO_DEPS = $(srcdir)/automake.info
@@ -518,6 +519,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 088a405..a03bd0f 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -48,6 +48,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -508,6 +509,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 636ee82..8d9cd99 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -46,6 +46,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 # If stdout is a non-dumb tty, use colors.  If test -t is not supported,
@@ -327,6 +328,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 2cb7cdc..72a2376 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -51,6 +51,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -483,6 +484,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index c3366b3..c4c7d8f 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -48,6 +48,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -305,6 +306,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/lib/am/clean.am b/lib/am/clean.am
index f3dd2c6..d74daca 100644
--- a/lib/am/clean.am
+++ b/lib/am/clean.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2008
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -29,6 +29,7 @@ clean-generic:
 distclean-am: distclean-generic clean-am
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 %DISTCLEAN_RMS%
 
 ## Makefiles and their dependencies cannot be cleaned by
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 3a8fbcd..39690cb 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -48,6 +48,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -302,6 +303,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8cddc57..45624af 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -181,6 +181,7 @@ confincl.test \
 conflnk.test \
 conflnk2.test \
 conflnk3.test \
+conflnk4.test \
 confsub.test \
 confvar.test \
 confvar2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 1ba9947..766ab9d 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -47,6 +47,7 @@ am__configure_deps = $(am__aclocal_m4_deps) 
$(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES = defs aclocal-${APIVERSION} automake-${APIVERSION}
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 # If stdout is a non-dumb tty, use colors.  If test -t is not supported,
@@ -331,6 +332,7 @@ confincl.test \
 conflnk.test \
 conflnk2.test \
 conflnk3.test \
+conflnk4.test \
 confsub.test \
 confvar.test \
 confvar2.test \
@@ -971,6 +973,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f 
$(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/tests/conflnk4.test b/tests/conflnk4.test
new file mode 100755
index 0000000..6fc3fb7
--- /dev/null
+++ b/tests/conflnk4.test
@@ -0,0 +1,96 @@
+#! /bin/sh
+# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test to make sure links to _identical files_ created by AC_CONFIG_LINKS get
+# removed with `make distclean' only if doing a VPATH build.
+
+. ./defs || exit 1
+
+set -e
+
+mkdir nonmk-subdir sdir sdir/mk-subdir
+: > src
+: > sdir/Makefile.am
+: > sdir/src2
+: > nonmk-subdir/src3
+: > sdir/mk-subdir/src4
+
+cat >> Makefile.am <<'EOF'
+SUBDIRS = sdir
+test: distdir
+       test -f $(distdir)/src
+       test -f $(distdir)/sdir/src2
+EOF
+
+cat >>configure.in << 'EOF'
+AC_CONFIG_FILES(sdir/Makefile)
+AC_CONFIG_LINKS(src:src)
+AC_CONFIG_LINKS(sdir/src2:sdir/src2)
+AC_CONFIG_LINKS(nonmk-subdir/src3:nonmk-subdir/src3)
+AC_CONFIG_LINKS(sdir/mk-subdir/src4:sdir/mk-subdir/src4)
+AC_OUTPUT
+EOF
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+
+# TODO: Make sure links are distributed
+$MAKE test
+
+# Make sure nothing is deleted by `make clean'
+$MAKE clean
+
+test -f ../src
+test -f ../sdir/src2
+test -f ../nonmk-subdir/src3
+test -f ../sdir/mk-subdir/src4
+
+# Make sure the links are deleted by `make distclean' and the original files
+# are not.
+$MAKE distclean
+
+test -f ../src
+test -f ../sdir/src2
+test -f ../nonmk-subdir/src3
+test -f ../sdir/mk-subdir/src4
+
+test -r src && exit 1
+test -r sdir/src2 && exit 1
+test -r nonmk-subdir/src3 && exit 1
+test -r sdir/mk-subdir/src4 && exit 1
+
+cd ..
+./configure
+
+# TODO: Make sure links are distributed
+$MAKE test
+
+# Make sure nothing is deleted by `make distclean'
+$MAKE distclean
+
+test -f src
+test -f sdir/src2
+test -f nonmk-subdir/src3
+test -f sdir/mk-subdir/src4


hooks/post-receive
--
GNU Automake




reply via email to

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