]> git.llucax.com Git - software/makeit.git/commitdiff
Allow overriding Doxygen configuration
authorLeandro Lucarella <llucarella@integratech.com.ar>
Mon, 5 Oct 2009 16:36:55 +0000 (13:36 -0300)
committerLeandro Lucarella <llucarella@integratech.com.ar>
Tue, 6 Oct 2009 17:53:48 +0000 (14:53 -0300)
Makeit.mak

index e438cb2c4918c3c6593bc2d49c8c0cdf107bd0be..56472fc097b8ecd90bedd3739b0dfd21ba169830 100644 (file)
@@ -369,20 +369,34 @@ $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 ;)
+# be the Doxyfile to use and the next prerequisites the input files.  You
+# can override Doxyfile configuration variables by defining a DOXYGEN_VARS
+# Make variable for this rule.  For example, defining:
+# PROJECT_NAME := myproj
+# DOXYGEN_VARS := PROJECT_NAME
+# You can override Doxygen's PROJECT_NAME configuration option. Optionally, you
+# can define DOXYGEN_VARS_PREFIX too, to avoid polluting your Makefile with
+# Doxygen variables.  For example:
+# DOXY.PROJECT_NAME := myproj
+# DOXYGEN_VARS_PREFIX := DOXY.
+# DOXYGEN_VARS := PROJECT_NAME
+# This rule might be still 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 $(<D)/%,$(INCLUDE_DIR)/$*/%, \
-                               $(wordlist 2,$(words $^),$^))"; \
+               $(if $(filter INPUT,$(DOXYGEN_VARS)),,\
+                       echo "INPUT=$(patsubst $(<D)/%,$(INCLUDE_DIR)/$*/%, \
+                                       $(wordlist 2,$(words $^),$^))";) \
                echo "OUTPUT_DIRECTORY=$(@D)"; \
                echo "INCLUDE_PATH=$(INCLUDE_DIR)"; \
                echo "STRIP_FROM_PATH=$(INCLUDE_DIR)"; \
                echo "STRIP_FROM_INC_PATH=$(INCLUDE_DIR)"; \
-               echo "QUIET=$(if $V,YES,NO)") | doxygen -,$(@D),doxygen)
+               echo "QUIET=$(if $V,YES,NO)"; \
+               $(foreach v,$(DOXYGEN_VARS),\
+                               echo '$v=$($(DOXYGEN_VARS_PREFIX)$v)';) \
+               ) | doxygen -,$(@D),doxygen)
        $V touch $@
 
 # Run Sphinx to build the documentation.  It expects the variable SPHINX_DIR