From 61f9e558c08ef6452fcd1c4f490f13cbe89ab87b Mon Sep 17 00:00:00 2001
From: Thimo Neubauer <thimo@dune-project.org>
Date: Wed, 8 Dec 2004 21:45:02 +0000
Subject: [PATCH] change dependency-tracking to shell-tricks as the fixed
 Doxydep still failed for me... this version is silly (searches for all
 .cc/.hh-files in all dirs) but doesn't have to deal with internal
 automake-files anymore

[[Imported from SVN: r1242]]
---
 doc/Makefile.am | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index f56cfc6c3..d0b26959a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -6,22 +6,28 @@ EXTRA_DIST = Buildsystem CodingStyles Doxyfile Doxydep \
 
 all: doxygen-tag
 
-doxygen-tag: Doxyfile
-@AMDEP_TRUE@	$(srcdir)/Doxydep $< $(DEPDIR)/doxygen.Po $@
-	$(DOXYGEN) > doxygen.log 2>&1
-	touch doxygen-tag
-
 WEBDIR = /var/www/dune/doxygen
 WEBFILES = html/*.html html/*.css html/*.png doxygen.log
 
+# what files does the doxygen-generated stuff depend on (find-syntax)
+DEPENDON = -name \*.cc -o -name \*.hh -o -name \*.css -o -name \*.html
+
+# check dependency ourself to be robust
+doxygen-tag: FORCE
+	if test ! -e doxygen-tag || test x"`find $(top_srcdir) \( $(DEPENDON) \) -a -cnewer doxygen-tag`" != x ; then \
+	  echo Running doxygen. This may take a while... ; \
+	  $(DOXYGEN) > doxygen.log 2>&1 ; \
+	  touch doxygen-tag ; \
+	fi
+
+# nice trick from the GNU make infopage to force a rule to run
+FORCE:
+
 web-install: doxygen-tag
 	if [ ! -d $(WEBDIR) ]; then \
 	  install -d -g web -m 775 $(WEBDIR); \
 	fi
 	install -g web -m 664 $(WEBFILES) $(WEBDIR)
 
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/doxygen.Po
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/doxygen.Po@am__quote@
-
 clean-local:
 	rm -rf html latex doxygen-tag *~
-- 
GitLab