]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix problem with out-of-date dependencies
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 Mar 2017 15:57:20 +0000 (08:57 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 Mar 2017 15:57:50 +0000 (08:57 -0700)
Problem reported by Robert Marshall in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00501.html
Although this problem has been with us for a while, the recent
change from Automake to GNU Make exposed it again.
* configure.ac (AUTO_DEPEND): When autodepending, clean out any
leftover dependency and object files, since the previous sources'
dependencies may disagree with the current ones.  Reconfiguring
typically needs to force a rebuild anyway.

configure.ac

index b922dc473d6cb5e6141382b7b5f6dc1438df18ab..48fcb3f33aa0691c578593714ce34a838e74a4cc 100644 (file)
@@ -1742,6 +1742,9 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
    AC_MSG_RESULT([$ac_enable_autodepend])
    if test $ac_enable_autodepend = yes; then
       AUTO_DEPEND=yes
+      for depdir in */deps; do
+       test ! -d "$depdir" || rm -fr "$depdir"/../*.o "$depdir" || exit
+      done
    fi
 fi
 AC_SUBST(AUTO_DEPEND)