automake-patches
[Top][All Lists]
Advanced

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

Re: bug#8473: depcomp bug with HP-UX cc and VPATH build


From: Stefano Lattarini
Subject: Re: bug#8473: depcomp bug with HP-UX cc and VPATH build
Date: Mon, 11 Apr 2011 12:29:51 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Monday 11 April 2011, Ralf Wildenhues wrote:
> Hi Stefano,
> 
> > I've spotted a couple of harmful typos in the patch, and I also
> > have a very minor nit.
> 
> You'd do me a big favor if you fixed them right away (if you have time)
> and merge to active branches.
>
Done in the attached patch.  It also turned out that depcomp10.test
wasn't executable; I've fixed that too.

All the `depend*.test' and `depcomp*.test' tests still pass or get
skipped (depcomp5.test and depcomp10.test only).

Unfortunately, I cannot truly fully test the patch, because the 'hp'
depmode doesn't work with gcc and Sun C compiler (and I don't hav
access to any other compiler ATM).  The test 'depmode10.test' is
correctly skipped with those compilers.

Bruno, if you have time, could you please test the patch?  That would
be really helpful.  Posting also the resulting test logs (for keeping
a reference) would be even greater.  Otherwise, I'll push in a couple
of hours or so, and hope for the best.

> I don't have my ssh keys available until tonight.
> 
> Thanks, and sorry for the messup,
> Ralf
> 

Thanks,
  Stefano
From 9ada18be77d81c1e79ac360bb7a57810b2b6f546 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 11 Apr 2011 12:26:58 +0200
Subject: [PATCH] depcomp: fix bugs in tests and in the depcomp script

* lib/depcomp (gcc): Remove duplicated `-e' from sed invocation.
* tests/depcomp10.test: Make it executable.  Fix a blunder that
has left part of an intended comment not prefixed by `#', thus
causing shell syntax errors.  In this same comment, break a
too-long reported error message on multiple lines, for clarity.
Add reference to the relevant bug report.  Add a comment which
explains why the test result 'skipped' if the first "make" call
fails.  Add other useful comments.
* tests/depcomp9.test: Slightly improve comments.
---
 ChangeLog            |   13 +++++++++++++
 lib/depcomp          |    4 ++--
 tests/depcomp10.test |   15 ++++++++++++---
 tests/depcomp9.test  |    8 +++++---
 4 files changed, 32 insertions(+), 8 deletions(-)
 mode change 100644 => 100755 tests/depcomp10.test

diff --git a/ChangeLog b/ChangeLog
index 4ce4b83..20862ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-04-11  Stefano Lattarini  <address@hidden>
+
+       depcomp: fix bugs in tests and in the depcomp script
+       * lib/depcomp (gcc): Remove duplicated `-e' from sed invocation.
+       * tests/depcomp10.test: Make it executable.  Fix a blunder that
+       has left part of an intended comment not prefixed by `#', thus
+       causing shell syntax errors.  In this same comment, break a
+       too-long reported error message on multiple lines, for clarity.
+       Add reference to the relevant bug report.  Add a comment which
+       explains why the test result 'skipped' if the first "make" call
+       fails.  Add other useful comments.
+       * tests/depcomp9.test: Slightly improve comments.
+
 2011-04-11  Ralf Wildenhues  <address@hidden>
 
        Fix hp depmode for VPATH builds with GNU make.
diff --git a/lib/depcomp b/lib/depcomp
index e996e5d..82ebc75 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2011-04-11-05; # UTC
+scriptversion=2011-04-11-10; # UTC
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2011,
 # Free Software Foundation, Inc.
@@ -162,7 +162,7 @@ gcc)
 ## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e -e "s|.*$object$||" '/:$/d' \
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" '/:$/d' \
       | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
diff --git a/tests/depcomp10.test b/tests/depcomp10.test
old mode 100644
new mode 100755
index 4fdee40..0fa6c6a
--- a/tests/depcomp10.test
+++ b/tests/depcomp10.test
@@ -16,12 +16,15 @@
 
 # hp depmode should work with GNU make in VPATH mode (bug similar to
 # depcomp9.test).
+# For automake bug#8473.
 
 # Here's the bug: hp depmode will prefix VPATH to the object file name,
 # thus the second gmake will invoke depcomp with object='../../src/foo.o',
-# causing errors such as:
-#   cpp: "", line 0: error 4066: Cannot create 
"../../gllib/.deps/nonblocking.TPo" file for 
"-M../../gllib/.deps/nonblocking.TPo" option. (No such file or dir
-+ectory[errno=2])
+# causing errors such as (broken on multiple lines for clarity):
+#   cpp: "", line 0: error 4066: Cannot create
+#        "../../gllib/.deps/nonblocking.TPo" file for
+#        "-M../../gllib/.deps/nonblocking.TPo" option.
+#        (No such file or directory[errno=2])
 
 required=GNUmake
 . ./defs || Exit 1
@@ -71,7 +74,13 @@ $AUTOMAKE -a
 
 cd build
 ../configure am_cv_CC_dependencies_compiler_type=hp
+# Do not error out with the first make, as the forced 'hp' depmode might
+# not actually work, but we have overridden the _AM_DEPENDENCIES tests.
 $MAKE || Exit 77
+
+# We must clean and rebuild, as the actual error only happens the second
+# time the objects are built because 'depcomp' has silently messed up the
+# .Po files the first time.
 $MAKE clean
 
 $MAKE >out 2>&1 || { cat out; Exit 1; }
diff --git a/tests/depcomp9.test b/tests/depcomp9.test
index d137fad..9972c3d 100755
--- a/tests/depcomp9.test
+++ b/tests/depcomp9.test
@@ -77,10 +77,12 @@ cd build
 
 # 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.
+# _AM_DEPENDENCIES tests.
 $MAKE || Exit 77
+
+# We must clean and rebuild, as 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 clean
 
 $MAKE >out 2>&1 || { cat out; Exit 1; }
-- 
1.7.2.3


reply via email to

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