Simplify use of gnulib-tool now that gnulib-tool --import works better.
diff --git a/ChangeLog b/ChangeLog
index f0abb06..f855a75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-23  Bruno Haible  <bruno@clisp.org>
+
+	Simplify use of gnulib-tool now that gnulib-tool --import works better.
+	* autogen.sh: Don't remove gnulib-cache.m4 before running gnulib-tool.
+	* Makefile.devel (srclib/Makefile.gnulib): Depend on 'force'.
+
 2010-07-31  Bruno Haible  <bruno@clisp.org>
 
 	* Makefile.devel (AUTOCONF, AUTOHEADER): Switch to version 2.67.
diff --git a/Makefile.devel b/Makefile.devel
index d39883a..c2c8606 100644
--- a/Makefile.devel
+++ b/Makefile.devel
@@ -83,7 +83,7 @@
   xalloc \
   libiconv-misc
 
-srclib/Makefile.gnulib :
+srclib/Makefile.gnulib : force
 	if test -n "$$GNULIB_TOOL"; then \
 	  $$GNULIB_TOOL --lib=libicrt --source-base=srclib --m4-base=srcm4 --makefile-name=Makefile.gnulib --no-libtool --local-dir=gnulib-local --no-vc-files \
 	    --import $(GNULIB_MODULES); \
diff --git a/autogen.sh b/autogen.sh
index 0be903c..fe1fb7a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -12,7 +12,7 @@
 # It also requires
 #   - the gperf program.
 
-# Copyright (C) 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 2003-2010 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
@@ -60,12 +60,6 @@
   fi
   # Skip the gnulib-tool step if gnulib-tool was not found.
   if test -n "$GNULIB_TOOL"; then
-    if test -f srcm4/gnulib-cache.m4; then
-      mv -f srcm4/gnulib-cache.m4 srcm4/gnulib-cache.m4~
-    fi
-    if test -f srclib/Makefile.gnulib; then
-      mv -f srclib/Makefile.gnulib srclib/Makefile.gnulib~
-    fi
     make -f Makefile.devel srclib/Makefile.gnulib GNULIB_TOOL="$GNULIB_TOOL"
   fi
 fi