better doxygen

master
Marc Wäckerlin 8 years ago
parent 7394853781
commit 4f99cd19bd
  1. 30
      scripts/ax_init_standard_project.m4
  2. 69
      scripts/bootstrap.sh

@ -170,15 +170,33 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'"
AX_SUBST(NUMBERS)
AX_SUBST(HOME)
README=$(tail -n +3 README)
if test -f README.md; then
README=$()
DESCRIPTION=$(head -1 README.md)
else
README=$(tail -n +3 README)
DESCRIPTION=$(head -1 README)
fi
if which pandoc 2>&1 > /dev/null; then
README_HTML=$(echo "$README" | pandoc -f markdown_github -t html | sed ':a;N;$!ba;s,\\n,\\\\\\\\n,g;s/\n/\\n/g;s,",\\",g')
else
README_HTML="${README}"
fi
AX_SUBST(README)
_AM_SUBST_NOTMAKE([README])
DESCRIPTION=$(head -1 README)
AX_SUBST(README_HTML)
_AM_SUBST_NOTMAKE([README_HTML])
AX_SUBST(DESCRIPTION)
_AM_SUBST_NOTMAKE([DESCRIPTION])
AUTHOR=$(head -1 AUTHORS)
AUTHOR_NAME=$(echo $AUTHOR | sed 's, *[[<(]].*$,,')
AUTHOR_URL=$(echo $AUTHOR | sed 's,.*(\(http[[^)]]*\)).*,\1,')
AUTHOR_MAIL=$(echo $AUTHOR | sed 's,.*<\(.*@.*\)>.*,\1,')
AX_SUBST(AUTHOR)
_AM_SUBST_NOTMAKE([AUTHOR])
AX_SUBST(AUTHOR_NAME)
AX_SUBST(AUTHOR_URL)
AX_SUBST(AUTHOR_MAIL)
DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null)
AX_SUBST(DISTRO)
ARCH=$((@<:@@<:@ $(uname -sm) =~ 64 @:>@@:>@ && echo amd64) || (@<:@@<:@ $(uname -sm) =~ 'i?86' @:>@@:>@ && echo i386 || uname -sm))
@ -444,7 +462,11 @@ EOF
# use this in configure.ac to support debian packages
AC_DEFUN([AX_USE_DEBIAN_PACKAGING], [
README_DEB=$(tail -n +3 README | sed -e 's/^ *$/./g' -e 's/^/ /g')
if test -f README.md; then
README_DEB=$(tail -n +3 README.md | sed -e 's/^ *$/./g' -e 's/^/ /g')
else
README_DEB=$(tail -n +3 README | sed -e 's/^ *$/./g' -e 's/^/ /g')
fi
AC_SUBST(README_DEB)
_AM_SUBST_NOTMAKE([README_DEB])
AC_CONFIG_FILES([debian/changelog debian/control])
@ -506,7 +528,7 @@ AC_DEFUN([AX_USE_DOXYGEN], [
AC_MSG_WARN([Missing program mscgen!
- when you rebild documentation, there are no message state charts
- there are precompiled derived files in the distribution]); fi
AC_CONFIG_FILES([doc/makefile doc/doxyfile])
AC_CONFIG_FILES([doc/makefile doc/doxyfile doc/header.html doc/footer.html])
AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-documentation], [doc/makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-documentation], [doc/makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-documentation], [doc/makefile.in])

@ -151,6 +151,9 @@ GENERATED FILES
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS
* doc/makefile.am - if you enabled AX_USE_DOXYGEN
* doc/doxyfile.in - if you enabled AX_USE_DOXYGEN
* doc/header.html.in - if you enabled AX_USE_DOXYGEN
* doc/footer.html.in - if you enabled AX_USE_DOXYGEN
* doc/style.css - if you enabled AX_USE_DOXYGEN
* test/makefile.am - if you enabled AX_USE_CPPUNIT and AX_USE_CXX
* test/${DEFAULT_PROJECT_NAME#lib}.cxx - if you enabled AX_BUILD_TEST or AX_USE_CPPUNIT
* examples/makefile.am - if you enabled AX_BUILD_EXAMPLES
@ -873,6 +876,58 @@ www_DATA =
MAINTAINERCLEANFILES = makefile.in
EOF
to --condition AX_USE_DOXYGEN doc/header.html.in <<EOF
<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen \$doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>\$projectname: \$title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>\$title</title><!--END !PROJECT_NAME-->
<link href="\$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="\$relpath^jquery.js"></script>
<script type="text/javascript" src="\$relpath^dynsections.js"></script>
\$treeview
\$search
\$mathjax
<link href="\$relpath^\$stylesheet" rel="stylesheet" type="text/css" />
\$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div id="projecthead">
<div id="projectlogo"><img alt="" src="\$relpath^\$projectlogo"/></div>
<div id="projectname">\$projectname</span>&#160;<span id="projectnumber">\$projectnumber</div>
<div id="projectbrief">\$projectbrief</div>
</div>
<nav>
<a href="https://dev.marc.waeckerlin.org/projects/\$projectname" target="_blank">Project Management</a>
<a href="https://dev.marc.waeckerlin.org/repository/sources/\$projectname/" target="_blank">Download</a>
<div>\$searchbox</div>
</nav>
</div>
EOF
to --condition AX_USE_DOXYGEN doc/footer.html.in <<EOF
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
\$navpath
<li class="footer"><a href="@AUTHOR_URL@" target="_blank">@AUTHOR_NAME@</a></li>
</ul>
</div>
</body>
</html>
EOF
to --condition AX_USE_DOXYGEN doc/style.css <<EOF
#titlearea {
display: flex;
justify-content: space-between;
align-items: flex-end;
}
EOF
if testtag AX_USE_DOXYGEN; then
if ! checkfile doc/doxyfile.in || \
contains doc/doxyfile.in "${rebuildfiles[@]}"; then
@ -893,12 +948,15 @@ if testtag AX_USE_DOXYGEN; then
doxyreplace MULTILINE_CPP_IS_BRIEF YES
doxyreplace TAB_SIZE 2
doxyreplace ALIASES '"id=\\par File-ID\\n"'
doxyadd ALIASES '"copy=\\par Copyright\\n"'
doxyadd ALIASES '"copy=\\par Copyright by <a href="@AUTHOR_URL@" target="_blank">@AUTHOR_NAME@</a>\\n"'
doxyadd ALIASES '"license=\\par License\\n"'
doxyadd ALIASES '"classmutex=\\par Reentrant:\\nAccess is locked with class static mutex @c "'
doxyadd ALIASES '"instancemutex=\\par Reentrant:\\nAccess is locked with per instance mutex @c "'
doxyadd ALIASES '"mutex=\\par Reentrant:\\nAccess is locked with mutex @c "'
doxyadd ALIASES '"api=\\xrefitem api \\"API Call\\" \\"\\""'
doxyadd ALIASES '"description=@DESCRIPTION@"'
doxyadd ALIASES '"readme=@README_HTML@"'
doxyadd ALIASES '"author=<a href="@AUTHOR_URL@" target="_blank">@AUTHOR_NAME@</a>"'
doxyreplace ENABLE_PREPROCESSING YES
doxyreplace MACRO_EXPANSION YES
doxyadd PREDEFINED '"NAMESPACE=@PACKAGE_NAME@"'
@ -927,7 +985,13 @@ if testtag AX_USE_DOXYGEN; then
fi
doxyreplace FILE_PATTERNS '*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.wt *.sql'
doxyreplace RECURSIVE YES
doxyreplace EXCLUDE_PATTERNS "moc_* uic_* qrc_*"
doxyreplace EXCLUDE_PATTERNS "moc_* uic_* qrc_* version.[ch]xx"
doxyreplace HTML_HEADER header.html
doxyreplace HTML_FOOTER footer.html
doxyreplace HTML_EXTRA_STYLESHEET style.css
doxyreplace HTML_DYNAMIC_SECTIONS YES
doxyreplace DISABLE_INDEX YES
doxyreplace GENERATE_TREEVIEW YES
if testtag AX_BUILD_EXAMPLES; then
doxyreplace EXAMPLE_PATH @top_srcdir@/examples
fi
@ -936,7 +1000,6 @@ if testtag AX_USE_DOXYGEN; then
doxyreplace SOURCE_BROWSER YES
doxyreplace INLINE_SOURCES YES
doxyreplace GENERATE_TESTLIST YES
doxyreplace GENERATE_TREEVIEW NO
doxyreplace SEARCHENGINE NO
doxyreplace GENERATE_HTML YES
doxyreplace GENERATE_LATEX NO

Loading…
Cancel
Save