From bd1e098b0726f0ffdca3bea2937fada9dbabd9b4 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 21 Sep 2009 12:46:03 -0300 Subject: [PATCH] Add doxygen-generated documentation support Now Lib.mak handle a new $D directory, where generated documentation should be built. A new "doc" phony rule is created to build all the documentation. Makefiles can append targets to the $(doc) variable to be build when the "doc" is used as a goal. A very specific but reasonably useful pattern rule is added to build doxygen based documentation. See the rule comment for more details. The example sub-project "otherproj" now includes doxygen-generated documentation as an example. --- Lib.mak | 33 +- subproj/Build.mak | 6 + subproj/Doxyfile | 1510 +++++++++++++++++++++++++++++++++++++++++++ subproj/otherproj.h | 12 + 4 files changed, 1557 insertions(+), 4 deletions(-) create mode 100644 subproj/Doxyfile diff --git a/Lib.mak b/Lib.mak index 1e09736..db8ffd5 100644 --- a/Lib.mak +++ b/Lib.mak @@ -63,6 +63,9 @@ B ?= $G/bin # Libraries directory L ?= $G/lib +# Documentation directory +D ?= $(VD)/doc + # Installation directory I := $(DESTDIR)$(prefix) @@ -281,6 +284,23 @@ $L/%.so: $G/link-o-flags $L/%.pc: $(call replace,$(PC_VARS),$*-PC-) +# Run doxygen to build the documentation. It expects the first prerequisite to +# be the Doxyfile to use and the next prerequisites the input files. This rule +# is a little restrictive, but you can always make your own if it doesn't fit +# your needs ;) +$D/%/doxygen-stamp: + $V mkdir -p $(@D) + $(call exec,(cat $<; \ + echo "FULL_PATH_NAMES=YES"; \ + echo "INPUT=$(patsubst $(