From: Leandro Lucarella Date: Mon, 21 Sep 2009 15:46:03 +0000 (-0300) Subject: Add doxygen-generated documentation support X-Git-Url: https://git.llucax.com/software/makeit.git/commitdiff_plain/bd1e098b0726f0ffdca3bea2937fada9dbabd9b4 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. --- 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 $(