From: Michael Gottesman Date: Wed, 28 Aug 2013 21:55:41 +0000 (+0000) Subject: [doxygen] Add a few missing variables to the doxygen.cfg.in for external search and... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44d971c5d8362229cb9456261b6ca5c688175e06;p=clang [doxygen] Add a few missing variables to the doxygen.cfg.in for external search and cleaned up external_search_map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189523 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 4e4cf433a1..8528c7af58 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -2,42 +2,37 @@ if (DOXYGEN_FOUND) if (LLVM_ENABLE_DOXYGEN) set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR}) - set(abs_builddir ${LLVM_BINARY_DIR}) + set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR}) if (HAVE_DOT) set(DOT ${LLVM_PATH_DOT}) endif() - if (DOXYGEN_EXTERNAL_SEARCH) - set(SEARCHENGINE "YES") - set(SERVER_BASED_SEARCH "YES") - set(EXTERNAL_SEARCH "YES") - - set(EXTRA_SEARCH_MAPPINGS "") - foreach(NameAndValue ${DOXYGEN_SEARCH_MAPPINGS}) - # Strip leading spaces - string(REGEX REPLACE "^[ ]+" "" NameAndValue ${NameAndValue}) - # Find variable name - string(REGEX MATCH "^[^=]+" Name ${NameAndValue}) - # Find the value - string(REPLACE "${Name}=" "" Value ${NameAndValue}) - # Set the variable - if (NOT ${Name} EQUALS clang) - set(EXTRA_SEARCH_MAPPINGS "${EXTRA_SEARCH_MAPPINGS} ${LLVM_BINARY_DIR}/${NameAndValue}") - endif() - endforeach() + if (LLVM_DOXYGEN_EXTERNAL_SEARCH) + set(enable_searchengine "YES") + set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}") + set(enable_server_based_search "YES") + set(enable_external_search "YES") + set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}") else() - set(SEARCHENGINE "NO") - set(SERVER_BASED_SEARCH "NO") - set(EXTERNAL_SEARCH "NO") - set(EXTRA_SEARCH_MAPPINGS "") + set(enable_searchengine "NO") + set(searchengine_url "") + set(enable_server_based_search "NO") + set(enable_external_search "NO") + set(extra_search_mappings "") endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) - set(abs_srcdir) - set(abs_builddir) + + set(abs_top_srcdir) + set(abs_top_builddir) set(DOT) + set(enable_searchengine) + set(searchengine_url) + set(enable_server_based_search) + set(enable_external_search) + set(extra_search_mappings) add_custom_target(doxygen-clang COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg diff --git a/docs/Makefile b/docs/Makefile index 0723ac986b..5e14fac0a9 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -21,9 +21,10 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in -e 's/@PACKAGE_VERSION@/mainline/' \ -e 's/@abs_builddir@/./g' \ -e 's/@enable_searchengine@/NO/g' \ - -e 's/@enable_server_based_search@/NO/g' \ + -e 's/@searchengine_url@//g' \ + -e 's/@enable_server_based_search@/NO/g' \ -e 's/@enable_external_search@/NO/g' \ - -e 's/@extra_search_mappings@/NO/g' > $@ + -e 's/@extra_search_mappings@//g' > $@ endif include $(CLANG_LEVEL)/Makefile diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in index 497d4bfdf6..61c0bd847f 100644 --- a/docs/doxygen.cfg.in +++ b/docs/doxygen.cfg.in @@ -1224,10 +1224,27 @@ DOT_CLEANUP = YES # Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = @enable_server_based_search@ +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = @enable_searchengine@ + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = @enable_server_based_search@ + +SEARCHENGINE_URL = @searchengine_url@ EXTERNAL_SEARCH = @enable_external_search@