Skip to content

Commit

Permalink
Merge pull request #433 from analogdevicesinc/rgetz-add-man-to-html-doc
Browse files Browse the repository at this point in the history
add man to html doc
  • Loading branch information
rgetz authored Apr 18, 2020
2 parents 2d7fad4 + 1bf5d6a commit 32aa6df
Show file tree
Hide file tree
Showing 44 changed files with 2,828 additions and 29 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ install_manifest.txt
Makefile
build/

html/
Doxyfile
doxygen_sqlite3.db
9 changes: 7 additions & 2 deletions CI/travis/before_install_linux
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ install_sphinx() {
}

handle_centos() {
# needed for man2html and a few other popular tools
yum search epel-release
yum info epel-release
yum -y install epel-release

# FIXME: see about adding `libserialport-dev` from EPEL ; maybe libusb-1.0.0-devel...
yum -y groupinstall 'Development Tools'
yum -y install cmake libxml2-devel libusb1-devel libaio-devel \
Expand All @@ -31,7 +36,7 @@ handle_centos() {

# CENTOS 6 will has issues with sphinx
if is_centos_at_least_ver "7" ; then
yum -y install doxygen
yum -y install doxygen man2html
install_sphinx
fi

Expand All @@ -54,7 +59,7 @@ handle_default() {
bzip2 gzip flex bison git lsb-release python3-pip

if [ -n "${GH_DOC_TOKEN}" ] ; then
sudo apt-get install -y doxygen
sudo apt-get install -y doxygen man2html
install_sphinx
fi
if [ `sudo apt-cache search libserialport-dev | wc -l` -gt 0 ] ; then
Expand Down
14 changes: 7 additions & 7 deletions CI/travis/make_linux
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ handle_default() {
mkdir -p build
cd build

echo "### cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON"
echo " -DPYTHON_BINDINGS=ON"
cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON \
-DPYTHON_BINDINGS=ON ..
FLAGS="-DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DPYTHON_BINDINGS=ON"

echo "### cmake ${FLAGS}"
cmake ${FLAGS} ..

echo "### make"
make
Expand All @@ -27,9 +27,9 @@ handle_default() {
if command_exists sphinx-build ; then
# to build the python doc, libiio and py-iio need to be installed
# so we need to re-do some minor things now that they are
echo "### enable -DWITH_DOC=ON"
cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON \
-DPYTHON_BINDINGS=ON -DWITH_DOC=ON ..
FLAGS="${FLAGS} -DWITH_DOC=ON -DWITH_MAN=ON"
echo "### cmake ${FLAGS}"
cmake ${FLAGS} ..
echo "### make"
make
fi
Expand Down
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,25 @@ if(WITH_DOC)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/bindings/csharp/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_csharp @ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/CI/travis/generateDocumentationAndDeploy.sh.in
${CMAKE_CURRENT_BINARY_DIR}/generateDocumentationAndDeploy.sh @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc DESTINATION ${CMAKE_HTML_DEST_DIR}/${CMAKE_API_DEST_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc
DESTINATION ${CMAKE_HTML_DEST_DIR}/${CMAKE_API_DEST_DIR}
FILES_MATCHING PATTERN "*.svg")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/ DESTINATION ${CMAKE_HTML_DEST_DIR})

add_custom_command(TARGET iio POST_BUILD
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM)
add_custom_command(TARGET iio POST_BUILD
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_csharp
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating C# documentation with Doxygen" VERBATIM)

if(NOT SKIP_INSTALL_ALL)
install(DIRECTORY ${HTML_DEST_DIR}
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).

WARN_LOGFILE =
WARN_LOGFILE = @CMAKE_BINARY_DIR@/Dox_output_@PROJECT_NAME@

#---------------------------------------------------------------------------
# Configuration options related to the input files
Expand Down
1 change: 1 addition & 0 deletions bindings/csharp/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private static extern IntPtr iio_create_context_from_uri(

/// <summary>Retrieve a human-readable information string about the current context.</summary>
public readonly string description;
/// <summary>Retrieve a information about the version context.</summary>
public readonly Version library_version, backend_version;

/// <summary>A <c>List</c> of all the IIO devices present on the current context.</summary>
Expand Down
Loading

0 comments on commit 32aa6df

Please sign in to comment.