Added update-doc target

This commit is contained in:
Shane Grant
2014-03-11 17:23:23 -07:00
parent a6e144a5a2
commit 43855f2e5c
5 changed files with 1928 additions and 4 deletions

View File

@@ -15,18 +15,17 @@ endif(Boost_FOUND)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
set(DOC_DEST ${CMAKE_CURRENT_SOURCE_DIR}/assets/doxygen)
set(DOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/doc/html)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.in ${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh @ONLY)
add_custom_target(update-doc
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.sh
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh
DEPENDS doc
COMMENT "Copying documentation to gh-pages branch" VERBATIM
)

1870
doc/doxygen.in Normal file

File diff suppressed because it is too large Load Diff

12
scripts/renameincludes.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
destdir="include_renamed"
echo -n "New prefix: "
read newprefix
cp -r include ${destdir}
newprefix=$(echo ${newprefix} | sed -e 's/\//\\\//')
find ${destdir} -name '*.hpp' -exec sed -i "s/#include <cereal/#include <${newprefix}\/cereal/" {} \;

18
scripts/updatecoverage.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Updates the coverage documentation, and copies it into the appropriate place
# in the gh-pages branch.
set -e
tempdir=`mktemp -d`
make coverage COVERAGE_OUTPUT=${tempdir}/coverage
git checkout gh-pages
rm -rf assets/coverage
cp -r ${tempdir}/coverage* assets/coverage/
rm -rf ${tempdir}

25
scripts/updatedoc.in Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Updates the doxygen documentation, and copies it into the appropriate place
# in the gh-pages branch.
set -e
tempdir=`mktemp -d`
branch=`git rev-parse --abbrev-ref HEAD`
cp -r @CMAKE_CURRENT_BINARY_DIR@/doc/html/ ${tempdir}
git stash
git checkout gh-pages-1.0
rm -rf @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen
mkdir @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen
cp -r ${tempdir}/html/* @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen/
rm -rf ${tempdir}
git commit @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen
git checkout ${branch}
git stash apply