diff --git a/am/doxygen b/am/doxygen
index 9194e729ab80afd568e14ced49ace47832968a08..57089b771eae7244b2682c2b8bd50e19933e5b77 100644
--- a/am/doxygen
+++ b/am/doxygen
@@ -85,8 +85,10 @@ html: doxygen-tag
 
 DUNEDOXYNIZE=@DUNE_COMMON_ROOT@/bin/dunedoxynize
 
-$(srcdir)/Doxyfile.in: $(srcdir)/Doxylocal
-	cd $(top_srcdir) && $(DUNEDOXYNIZE)
+$(srcdir)/Doxyfile.in: FORCE
+	if test -f $(srcdir)/Doxylocal && test $(srcdir)/Doxylocal -nt $(srcdir)/Doxyfile.in; then \
+	  cd $(top_srcdir) && $(DUNEDOXYNIZE); \
+	fi
 
 if WML
 # how to install the doxygen documentation