From cee98aadb12915a6103306746495b0592573d57a Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 7 Jul 2014 15:24:48 -0700 Subject: [PATCH] doc: make doxygen program configurable Signed-off-by: Timothy Gu Signed-off-by: Michael Niedermayer --- configure | 12 +++++++++++- doc/Makefile | 2 +- doc/doxy-wrapper.sh | 5 +++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/configure b/configure index d5314776bf..a398bb3a14 100755 --- a/configure +++ b/configure @@ -286,6 +286,7 @@ Toolchain options: --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default] --pkg-config-flags=FLAGS pass additional flags to pkgconf [] --ranlib=RANLIB use ranlib RANLIB [$ranlib_default] + --doxygen=DOXYGEN use DOXYGEN to generate API doc [$doxygen_default] --host-cc=HOSTCC use host C compiler HOSTCC --host-cflags=HCFLAGS use HCFLAGS when compiling for host --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host @@ -1877,6 +1878,7 @@ CMDLINE_SET=" cross_prefix cxx dep_cc + doxygen extra_version gas host_cc @@ -2618,6 +2620,7 @@ cc_default="gcc" cxx_default="g++" host_cc_default="gcc" cp_f="cp -f" +doxygen_default="doxygen" install="install" ln_s="ln -s -f" nm_default="nm -g" @@ -2994,7 +2997,8 @@ case "$toolchain" in ;; esac -set_default arch cc cxx pkg_config ranlib strip sysinclude target_exec target_os yasmexe +set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ + target_exec target_os yasmexe enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -3003,6 +3007,11 @@ if ! $pkg_config --version >/dev/null 2>&1; then pkg_config=false fi +if test $doxygen != $doxygen_default && \ + ! $doxygen --version >/dev/null 2>&1; then + warn "Specified doxygen \"$doxygen\" not found, API documentation will fail to build." +fi + exesuf() { case $1 in mingw32*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;; @@ -5388,6 +5397,7 @@ LD_PATH=$LD_PATH DLLTOOL=$dlltool WINDRES=$windres DEPWINDRES=$dep_cc +DOXYGEN=$doxygen LDFLAGS=$LDFLAGS SHFLAGS=$(echo $($ldflags_filter $SHFLAGS)) ASMSTRIPFLAGS=$ASMSTRIPFLAGS diff --git a/doc/Makefile b/doc/Makefile index a59c1640e5..de0de4e63a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -112,7 +112,7 @@ OBJDIRS += doc/examples DOXY_INPUT = $(addprefix $(SRC_PATH)/, $(INSTHEADERS) $(DOC_EXAMPLES:%$(EXESUF)=%.c) $(LIB_EXAMPLES:%$(EXESUF)=%.c)) doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(SRC_PATH)/doc/doxy-wrapper.sh $(DOXY_INPUT) - $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $< $(DOXY_INPUT) + $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $< $(DOXYGEN) $(DOXY_INPUT) install-doc: install-html install-man diff --git a/doc/doxy-wrapper.sh b/doc/doxy-wrapper.sh index 13be8cb950..d88f60e55d 100755 --- a/doc/doxy-wrapper.sh +++ b/doc/doxy-wrapper.sh @@ -2,10 +2,11 @@ SRC_PATH="${1}" DOXYFILE="${2}" +DOXYGEN="${3}" -shift 2 +shift 3 -doxygen - <