]> git.ipfire.org Git - people/ms/strongswan.git/blobdiff - Makefile.am
apidoc: Fix make target dependency find precedence
[people/ms/strongswan.git] / Makefile.am
index 0703abc10720ca0a158afbcf56f9fe0d0e650c52..99356b0934dbf7ed513ac7e96b312be7e32b721e 100644 (file)
@@ -34,11 +34,13 @@ Doxyfile :  Doxyfile.in
                sed \
                -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
                -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
-               -e "s:\@SRC_DIR\@:$(srcdir):" \
+               -e "s:\@SRC_DIR\@:$(srcdir):g" \
                $(srcdir)/$@.in > $@
 
 apidoc :       Doxyfile
-               doxygen
+               @test -d apidoc || doxygen
+               @! find Doxyfile src/ \( -name '*.h' -o -name '*.md' \) -newer apidoc | \
+                       grep -q '' || doxygen && touch apidoc
 
 cov-reset-common:
                @rm -rf $(top_builddir)/coverage
@@ -75,4 +77,4 @@ clean-local: cov-reset-common
                @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcno" -delete
                @rm -rf apidoc
 
-.PHONY: cov-reset-common cov-reset cov-report coverage
+.PHONY: cov-reset-common cov-reset cov-report coverage apidoc