OSDN Git Service

doc: use Doxyfile template
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 19 Jan 2018 18:12:29 +0000 (19:12 +0100)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 1 Feb 2018 01:24:11 +0000 (09:24 +0800)
Instead of passing environment variables to the Doxygen process,
Doxyfile will be autogenerated from Doxyfile.in template.

doc/Doxyfile.in [moved from doc/Doxyfile with 99% similarity]
doc/Makefile.am

similarity index 99%
rename from doc/Doxyfile
rename to doc/Doxyfile.in
index 0f24603..00b6354 100644 (file)
@@ -40,7 +40,7 @@ PROJECT_NAME           = "VA-API"
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         =
+PROJECT_NUMBER         = @PACKAGE_VERSION@
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
@@ -60,7 +60,7 @@ PROJECT_LOGO           =
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       =
+OUTPUT_DIRECTORY       = @OUTDIR@
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
@@ -164,7 +164,7 @@ FULL_PATH_NAMES        = YES
 # will be relative from the directory where doxygen is started.
 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
 
 # will be relative from the directory where doxygen is started.
 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
 
-STRIP_FROM_PATH        = $(VA_HEADER_DIR)
+STRIP_FROM_PATH        = @VA_HEADER_DIR@
 
 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
 # path mentioned in the documentation of a class, which tells the reader which
 
 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
 # path mentioned in the documentation of a class, which tells the reader which
@@ -792,7 +792,7 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = $(VA_HEADER_FILES)
+INPUT                  = @VA_HEADER_FILES@
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1150,7 +1150,7 @@ HTML_HEADER            =
 # that doxygen normally uses.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
 # that doxygen normally uses.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_FOOTER            = $(VA_HTML_FOOTER)
+HTML_FOOTER            = @VA_HTML_FOOTER@
 
 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
 # sheet that is used by each HTML page. It can be used to fine-tune the look of
 
 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
 # sheet that is used by each HTML page. It can be used to fine-tune the look of
index d6854d2..c9b5343 100644 (file)
@@ -24,7 +24,7 @@ all: html
 install-data-local: install-html
 
 EXTRA_DIST = \
 install-data-local: install-html
 
 EXTRA_DIST = \
-       Doxyfile                        \
+       Doxyfile.in                     \
        $(NULL)
 
 VA_HEADER_DIR   = $(top_srcdir)/va
        $(NULL)
 
 VA_HEADER_DIR   = $(top_srcdir)/va
@@ -47,13 +47,18 @@ VA_HEADER_FILES = \
        $(NULL)
 
 VA_HTML_FOOTER         = va_footer.html
        $(NULL)
 
 VA_HTML_FOOTER         = va_footer.html
-VA_HTML_FRAGMENTS      = $(VA_HTML_FOOTER)
 
 
-export VA_HEADER_DIR
-export VA_HEADER_FILES
-export VA_HTML_FOOTER
-html-out/index.html: Doxyfile $(VA_HEADER_FILES) $(VA_HTML_FRAGMENTS)
-       $(DOXYGEN) $<
+Doxyfile: Doxyfile.in $(VA_HEADER_FILES) $(VA_HTML_FOOTER)
+       $(AM_V_GEN) $(SED)                                      \
+           -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):"      \
+           -e "s:\@VA_HEADER_DIR\@:$(VA_HEADER_DIR):"          \
+           -e "s:\@VA_HEADER_FILES\@:$(VA_HEADER_FILES):"      \
+           -e "s:\@VA_HTML_FOOTER\@:$(VA_HTML_FOOTER):"        \
+           -e "s:\@OUTDIR\@::"                                 \
+           $< > $@
+
+html-out/index.html: Doxyfile
+       $(AM_V_GEN) $(DOXYGEN)
 
 if ENABLE_DOCS
 html: html-out/index.html
 
 if ENABLE_DOCS
 html: html-out/index.html
@@ -72,4 +77,4 @@ uninstall-local:
 endif
 
 # Extra clean files so that maintainer-clean removes *everything*
 endif
 
 # Extra clean files so that maintainer-clean removes *everything*
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in Doxyfile