I noticed that we don't even have testsuite coverage for the deleted header file bug yet, except for an accidental one. So here's a patch to address that.
I think it's safe enough for maint; but anyway I will wait a bit for comments or review before pushing. By the way, if you would like me to send patches in 'git am'-suitable format, e.g., for testing them, please speak up, I'm all for making things equal for all if that helps (I just need to reorder my workflow a bit then). Thanks, Ralf Add test coverage for deleted header files. * tests/depcomp6.test, tests/depcomp7.test: Update tests to also check for the deleted header bug. If no dependency tracking mechanism could be found, SKIP rather than exit successfully. diff --git a/tests/depcomp6.test b/tests/depcomp6.test index 7fc651f..5713e7e 100755 --- a/tests/depcomp6.test +++ b/tests/depcomp6.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2006, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006, 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 @@ -89,7 +89,8 @@ $AUTOMAKE -a $MAKE # check that dependency tracking works -if grep 'depmode=none' Makefile; then : +if grep 'depmode=none' Makefile; then + Exit 77 else cd sub2 $sleep @@ -99,6 +100,12 @@ else # flag is active if a command within "&&" fails inside a compound # statement. if $MAKE; then Exit 1; else :; fi + + # Ensure the deleted header bug is fixed. + rm -f sub3/ba3.h + sed 1d sub3/ba3.c >sub3/ba3.t + mv -f sub3/ba3.t sub3/ba3.c + $MAKE fi : diff --git a/tests/depcomp7.test b/tests/depcomp7.test index 695041a..3edbd71 100755 --- a/tests/depcomp7.test +++ b/tests/depcomp7.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006, 2007, 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 @@ -77,7 +77,7 @@ cat >sub2/baz.h <<'END' extern int baz(); END -cat >sub2/sub3/ba3.c <<'END' +cat >sub2/sub3/ba3.in <<'END' #include "ba3.h" int ba3() { return 0; } END @@ -87,13 +87,16 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a +st=0 for staticshared in --disable-shared "" --disable-static; do + cp sub2/sub3/ba3.in sub2/sub3/ba3.c ./configure --enable-dependency-tracking $staticshared $MAKE # check that dependency tracking works - if grep 'depmode=none' Makefile; then : + if grep 'depmode=none' Makefile; then + st=77 else cd sub2 $sleep @@ -103,6 +106,11 @@ for staticshared in --disable-shared "" --disable-static; do # flag is active if a command within "&&" fails inside a compound # statement. if $MAKE; then Exit 1; else :; fi + + # Ensure the deleted header bug is fixed. + rm -f sub3/ba3.h + sed 1d sub3/ba3.in >sub3/ba3.c + $MAKE cd .. fi @@ -114,4 +122,4 @@ for staticshared in --disable-shared "" --disable-static; do done -: +Exit $st