r189509 - [doxygen] Added support for doxygen external search.

Michael Gottesman mgottesman at apple.com
Wed Aug 28 13:29:45 PDT 2013


Author: mgottesman
Date: Wed Aug 28 15:29:44 2013
New Revision: 189509

URL: http://llvm.org/viewvc/llvm-project?rev=189509&view=rev
Log:
[doxygen] Added support for doxygen external search.

Modified:
    cfe/trunk/docs/CMakeLists.txt
    cfe/trunk/docs/Makefile
    cfe/trunk/docs/doxygen.cfg.in

Modified: cfe/trunk/docs/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/CMakeLists.txt?rev=189509&r1=189508&r2=189509&view=diff
==============================================================================
--- cfe/trunk/docs/CMakeLists.txt (original)
+++ cfe/trunk/docs/CMakeLists.txt Wed Aug 28 15:29:44 2013
@@ -1,13 +1,38 @@
 
 if (DOXYGEN_FOUND)
 if (LLVM_ENABLE_DOXYGEN)
-  set(abs_srcdir ${LLVM_MAIN_SRC_DIR})
+  set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
   set(abs_builddir ${LLVM_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()
+  else()
+    set(SEARCHENGINE "NO")
+    set(SERVER_BASED_SEARCH "NO")
+    set(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)

Modified: cfe/trunk/docs/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/Makefile?rev=189509&r1=189508&r2=189509&view=diff
==============================================================================
--- cfe/trunk/docs/Makefile (original)
+++ cfe/trunk/docs/Makefile Wed Aug 28 15:29:44 2013
@@ -19,7 +19,11 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg
 	  -e 's/@abs_srcdir@/./g' \
 	  -e 's/@DOT@/dot/g' \
 	  -e 's/@PACKAGE_VERSION@/mainline/' \
-	  -e 's/@abs_builddir@/./g' > $@
+	  -e 's/@abs_builddir@/./g' \
+	  -e 's/@enable_searchengine@/NO/g' \
+          -e 's/@enable_server_based_search@/NO/g' \
+	  -e 's/@enable_external_search@/NO/g' \
+	  -e 's/@extra_search_mappings@/NO/g' > $@
 endif
 
 include $(CLANG_LEVEL)/Makefile

Modified: cfe/trunk/docs/doxygen.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/doxygen.cfg.in?rev=189509&r1=189508&r2=189509&view=diff
==============================================================================
--- cfe/trunk/docs/doxygen.cfg.in (original)
+++ cfe/trunk/docs/doxygen.cfg.in Wed Aug 28 15:29:44 2013
@@ -1227,4 +1227,10 @@ DOT_CLEANUP            = YES
 # 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           = NO
+SEARCHENGINE           = @enable_server_based_search@
+
+EXTERNAL_SEARCH        = @enable_external_search@
+
+EXTERNAL_SEARCH_ID     = clang
+
+EXTRA_SEARCH_MAPPINGS  = @extra_search_mappings@





More information about the cfe-commits mailing list