Skip to content

Commit

Permalink
Doxygen: put results in a version'ed subdirectory
Browse files Browse the repository at this point in the history
this will put Doxygen into a version'ed subdirectory, so when we copy to
gh-pages, we will not write overtop of older versions (which people may
still need).

This also put things in a ./libiio dir, since we will soon be putting
python bindings side by side. (in the same version directory)

Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Apr 6, 2020
1 parent 1eadf73 commit 4f0bcc7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions CI/travis/generateDocumentationAndDeploy.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ set -e
# by the time this script is run, we should have already made the docs
cd $TRAVIS_BUILD_DIR/build
#docs should be in the $TRAVIS_BUILD_DIR/build/html directory
if [ ! -d "html" ] || [ ! -f "./html/index.html" ]; then
if [ ! -d "html" ] || [ ! -f "./html/v@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@/@PROJECT_NAME@/index.html" ]; then
echo '' >&2
echo 'Warning: No documentation (html) files have been found!' >&2
echo 'Warning: Not going to push the documentation to GitHub!' >&2
Expand All @@ -55,9 +55,9 @@ cd $GH_REPO_NAME
# stayed the same and will only update the changed files. So the gh-pages branch
# can be safely cleaned, and it is sure that everything pushed later is the new
# documentation.
rm -rf *
rm -rf v@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@/*

#copy the files over
#copy the files over, this should add the new version
cp -a ../html/* ./

##### Configure git.
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,16 @@ if(WITH_DOC)
set(CMAKE_CASE_SENSITIVE_FILESYSTEM "NO")
endif()

set(CMAKE_HTML_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/html/v${LIBIIO_VERSION_MAJOR}.${LIBIIO_VERSION_MINOR}")
set(CMAKE_API_DEST_DIR "${PROJECT_NAME}")

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/CI/travis/generateDocumentationAndDeploy.sh.in
${CMAKE_CURRENT_BINARY_DIR}/generateDocumentationAndDeploy.sh @ONLY)
set(HTML_DEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/html)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc DESTINATION ${HTML_DEST_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc DESTINATION ${CMAKE_HTML_DEST_DIR}/${CMAKE_API_DEST_DIR})

add_custom_command(TARGET iio POST_BUILD
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
Expand Down
4 changes: 2 additions & 2 deletions Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = .
OUTPUT_DIRECTORY = @CMAKE_HTML_DEST_DIR@
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English

Expand Down Expand Up @@ -893,7 +893,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_OUTPUT = html
HTML_OUTPUT = @PROJECT_NAME@

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
Expand Down

0 comments on commit 4f0bcc7

Please sign in to comment.