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. v1.11-738-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-738-g3a5f0a8
Date: Sat, 09 Apr 2011 10:40:31 +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=3a5f0a8b5e9d3116718cb55c1c0e46195b53a2ca

The branch, master has been updated
       via  3a5f0a8b5e9d3116718cb55c1c0e46195b53a2ca (commit)
       via  7953494a128593bf74d2849f488f593c4d4fea9c (commit)
       via  6a85bc48aa9691574053a153d79cc79cd28e311f (commit)
      from  d555ae188b43938b7d1742164e9ae774382d4edd (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 3a5f0a8b5e9d3116718cb55c1c0e46195b53a2ca
Merge: d555ae1 7953494
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Apr 9 12:39:44 2011 +0200

    Merge branch 'maint'

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

Summary of changes:
 ChangeLog           |   16 +++++++++
 NEWS                |    2 +
 lib/depcomp         |   10 +++--
 tests/Makefile.am   |    1 +
 tests/Makefile.in   |    1 +
 tests/depcomp9.test |   90 +++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 116 insertions(+), 4 deletions(-)
 create mode 100755 tests/depcomp9.test

diff --git a/ChangeLog b/ChangeLog
index d8750df..c254863 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-04-09  Ralf Wildenhues  <address@hidden>
+
+       Clarify regex code in depcomp.
+       * lib/depcomp: Add comment why we don't need regex-escaping here.
+       Suggested by Stefano Lattarini.
+
+2011-04-08  Ralf Wildenhues  <address@hidden>
+
+       Fix makedepend depmode for VPATH builds.
+       * lib/depcomp [makedepend]: Remove any VPATH prefix from the
+       object file name, so a rebuild doesn't attempt to update the
+       .Po files in the source tree.
+       * tests/depcomp9.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+
 2011-04-02  Stefano Lattarini  <address@hidden>
 
        tests: fix timestamp-related failures
diff --git a/NEWS b/NEWS
index d368eec..1fc539d 100644
--- a/NEWS
+++ b/NEWS
@@ -120,6 +120,8 @@ Bugs fixed in 1.11a:
 
   - The parallel-tests driver now does not produce erroneous results
     with Tru64/OSF 5.1 sh upon unreadable log files any more.
+
+  - The makedepend depmode now works better with VPATH builds.
 
 New in 1.11:
 
diff --git a/lib/depcomp b/lib/depcomp
index c3163be..43bd0f9 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2010-10-07.20; # UTC
+scriptversion=2011-04-09-11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 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
@@ -557,7 +557,9 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
   sed '1,2d' "$tmpdepfile" | tr ' ' '
 ' | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7f165ac..880206e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -371,6 +371,7 @@ depcomp6.test \
 depcomp7.test \
 depcomp8a.test \
 depcomp8b.test \
+depcomp9.test \
 depdist.test \
 depend.test \
 depend2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d1e3a73..90f3d6b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -632,6 +632,7 @@ depcomp6.test \
 depcomp7.test \
 depcomp8a.test \
 depcomp8b.test \
+depcomp9.test \
 depdist.test \
 depend.test \
 depend2.test \
diff --git a/tests/depcomp9.test b/tests/depcomp9.test
new file mode 100755
index 0000000..d137fad
--- /dev/null
+++ b/tests/depcomp9.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2011 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 2, 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/>.
+
+# makedepend should work in VPATH mode.
+
+# Here's the bug: makedepend will prefix VPATH to the object file name,
+# thus the second make will invoke depcomp with object='../../src/foo.o',
+# causing errors such as:
+# touch: cannot touch `../../src/.deps/foo.TPo': No such file or directory
+# makedepend: error:  cannot open "../../src/.deps/foo.TPo"
+# ../../depcomp: line 560: ../../src/.deps/foo.TPo: No such file or directory
+
+# We include subfoo only to be sure that we don't remove too much
+# from the object file name.
+
+required='makedepend'
+. ./defs || Exit 1
+
+mkdir src src/sub build
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([src/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = src
+END
+
+cat > src/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foo.h sub/subfoo.c
+END
+
+cat > src/foo.h <<EOF
+extern int subfoo (void);
+EOF
+
+cat >src/foo.c <<EOF
+#include "foo.h"
+int main (void)
+{
+  return subfoo ();
+}
+EOF
+
+cat >src/sub/subfoo.c <<EOF
+#include "foo.h"
+int subfoo (void)
+{
+  return 0;
+}
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cd build
+../configure am_cv_CC_dependencies_compiler_type=makedepend
+
+# Do not error out with the first make, as the forced 'makedepend'
+# depmode might not actually work, but we have overridden the
+# _AM_DEPENDENCIES tests.  The actual error only happens the second time
+# the objects are built, because 'makedepend' has silently messed up the
+# .Po files the first time.
+$MAKE || Exit 77
+$MAKE clean
+
+$MAKE >out 2>&1 || { cat out; Exit 1; }
+cat out
+grep 'src/[._]deps' out && Exit 1
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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