documentation improved

master
Marc Wäckerlin 8 years ago
parent 4f99cd19bd
commit 595897bc9d
  1. 6
      scripts/ax_init_standard_project.m4
  2. 47
      scripts/bootstrap.sh

@ -178,7 +178,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
DESCRIPTION=$(head -1 README) DESCRIPTION=$(head -1 README)
fi fi
if which pandoc 2>&1 > /dev/null; then 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') README_HTML=$(echo "$README" | pandoc -f markdown_github -t html | sed ':a;N;$!ba;s,\\\(.\),\\\\<span>\1</span>,g;s/\n/\\n/g;s,",\\",g;s, ,\&nbsp;\&nbsp;,g')
else else
README_HTML="${README}" README_HTML="${README}"
fi fi
@ -197,6 +197,10 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AX_SUBST(AUTHOR_NAME) AX_SUBST(AUTHOR_NAME)
AX_SUBST(AUTHOR_URL) AX_SUBST(AUTHOR_URL)
AX_SUBST(AUTHOR_MAIL) AX_SUBST(AUTHOR_MAIL)
PROJECT_URL="${PROJECT_URL:-${AUTHOR_URL}/projects/${PACKAGE_NAME}}"
SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${AUTHOR_URL}/downloads/${PACKAGE_NAME}}"
AX_SUBST(PROJECT_URL)
AX_SUBST(SOURCE_DOWNLOAD)
DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null) DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null)
AX_SUBST(DISTRO) AX_SUBST(DISTRO)
ARCH=$((@<:@@<:@ $(uname -sm) =~ 64 @:>@@:>@ && echo amd64) || (@<:@@<:@ $(uname -sm) =~ 'i?86' @:>@@:>@ && echo i386 || uname -sm)) ARCH=$((@<:@@<:@ $(uname -sm) =~ 64 @:>@@:>@ && echo amd64) || (@<:@@<:@ $(uname -sm) =~ 'i?86' @:>@@:>@ && echo i386 || uname -sm))

@ -569,6 +569,20 @@ if ! testtag AX_CHECK_QT && \
! testtag AX_REQUIRE_QT; then ! testtag AX_REQUIRE_QT; then
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \ echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \
to --condition AX_USE_CXX src/makefile.am to --condition AX_USE_CXX src/makefile.am
if ! ls src/*.[ch]xx; then
to --condition AX_USE_CXX src/${PACKAGE_NAME#lib}.hxx <<EOF
${CHEADER}#ifndef ${PackageName^^}_HXX
#define ${PackageName^^}_HXX
/** @mainpage @description
@readme
*/
#endif
EOF
fi
elif ! test -e src/makefile.am; then elif ! test -e src/makefile.am; then
to --condition AX_USE_CXX src/makefile.am <<EOF to --condition AX_USE_CXX src/makefile.am <<EOF
${HEADER}bin_PROGRAMS = ${PACKAGE_NAME} ${HEADER}bin_PROGRAMS = ${PACKAGE_NAME}
@ -659,10 +673,17 @@ int main(int argc, char *argv[]) try {
return 1; return 1;
} }
EOF EOF
to --condition AX_USE_CXX src/${PACKAGE_NAME}.hxx <<EOF if ! ls src/*.[ch]xx; then
to --condition AX_USE_CXX src/${PACKAGE_NAME#lib}.hxx <<EOF
${CHEADER}#ifndef ${PackageName^^}_HXX ${CHEADER}#ifndef ${PackageName^^}_HXX
#define ${PackageName^^}_HXX #define ${PackageName^^}_HXX
/** @mainpage @description
@readme
*/
#include <QMainWindow> #include <QMainWindow>
#include <ui_${PACKAGE_NAME}.hxx> #include <ui_${PACKAGE_NAME}.hxx>
@ -679,7 +700,8 @@ class ${PackageName}: public QMainWindow, protected Ui::${PackageName} {
#endif #endif
EOF EOF
to --condition AX_USE_CXX src/${PACKAGE_NAME}.ui <<EOF fi
to --condition AX_USE_CXX src/${PACKAGE_NAME#lib}.ui <<EOF
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>${PackageName}</class> <class>${PackageName}</class>
@ -761,7 +783,7 @@ EOF
to --condition AX_USE_CXX src/version.cxx <<EOF to --condition AX_USE_CXX src/version.cxx <<EOF
/*! @file /*! @file
@id $Id\$ @id \$Id\$
*/ */
// 1 2 3 4 5 6 7 8 // 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890 // 45678901234567890123456789012345678901234567890123456789012345678901234567890
@ -905,8 +927,8 @@ to --condition AX_USE_DOXYGEN doc/header.html.in <<EOF
<div id="projectbrief">\$projectbrief</div> <div id="projectbrief">\$projectbrief</div>
</div> </div>
<nav> <nav>
<a href="https://dev.marc.waeckerlin.org/projects/\$projectname" target="_blank">Project Management</a> <a href="@PROJECT_URL@" target="_blank">Project Management</a>
<a href="https://dev.marc.waeckerlin.org/repository/sources/\$projectname/" target="_blank">Download</a> <a href="@SOURCE_DOWNLOAD@" target="_blank">Download</a>
<div>\$searchbox</div> <div>\$searchbox</div>
</nav> </nav>
</div> </div>
@ -925,7 +947,18 @@ to --condition AX_USE_DOXYGEN doc/style.css <<EOF
#titlearea { #titlearea {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-begin;
}
#titlearea nav {
padding: 0;
margin: 0;
}
#titlearea nav a {
background-color: lightgray;
border: 1px solid gray;
color: black;
padding: 1ex;
margin: 0;
} }
EOF EOF
if testtag AX_USE_DOXYGEN; then if testtag AX_USE_DOXYGEN; then
@ -1026,7 +1059,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
-- @AUTHOR@ @BUILD_DATE@ -- @AUTHOR@ @BUILD_DATE@
EOF EOF
BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
to debian/control.in <<EOF to debian/control.in <<EOF
Source: @PACKAGE_NAME@ Source: @PACKAGE_NAME@
Priority: extra Priority: extra

Loading…
Cancel
Save