Commit 631683cd authored by Thomas Fetzer's avatar Thomas Fetzer Committed by Kilian Weishaupt
Browse files

[doxygen,cmake] Sanitize links for doxygen, a cmake macros is necessary for this

Add preprocessor deprecations to deprecation list in doxygen
parent 9702abcc
......@@ -2,6 +2,7 @@ set(modules
AddInputFileLinks.cmake
CheckConstexpr.cmake
CopyOfDuneSymlinkOrCopy.cmake
DumuxDoxygen.cmake
DumuxMacros.cmake
DumuxTestMacros.cmake)
include(GNUInstallDirs)
......
# add_dumux_doxgen_target
#
# make sure, that the doxygen links to todo list, bibliography, etc. are correct
MACRO (add_dumux_doxygen_target)
add_doxygen_target()
add_custom_command(TARGET doxygen_${ProjectName}
POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/doc/doxygen/sanitizelinks.sh)
ENDMACRO (add_dumux_doxygen_target)
......@@ -2,6 +2,7 @@
include(CheckConstexpr)
# additional macros
include(AddInputFileLinks)
include(DumuxDoxygen)
include(DumuxTestMacros)
find_package(Gnuplot)
......
# shortcut for creating the Doxyfile.in and Doxyfile
add_doxygen_target()
add_dumux_doxygen_target()
......@@ -24,8 +24,11 @@ EXTRA_PACKAGES += amsmath,amssymb,units
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
# disable macro expansion (Otherwise, certain properties will not appear
# in the documentation properly. This should be fixed at some time.)
MACRO_EXPANSION = NO
CITE_BIB_FILES = @top_srcdir@/doc/handbook/dumux-handbook
# the bibliography file used for the doxygen documentation
CITE_BIB_FILES = @top_srcdir@/doc/handbook/dumux-handbook.bib
# enable macro expansion only for specified macros
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = "DUNE_DEPRECATED:=/** \deprecated */" \
"DUNE_DEPRECATED_MSG(A):=/** \deprecated A */"
# sanitizes the links to the given lists, because doxygen somehow links
# to a page with a wrong index
function sanitizelinks {
NEW_FILE=`grep -l "\"title\">$1" html/*html | egrep -o [0-9]+`
OLD_FILE=`awk -v a=$NEW_FILE 'BEGIN {printf("%05d", a-1)}'`
sed -i "s/$OLD_FILE/$NEW_FILE/g" html/*html
}
sanitizelinks "Todo List"
sanitizelinks "Bug List"
sanitizelinks "Deprecated List"
sanitizelinks "Bibliography"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment