Files
rocm-systems/source/scripts/update-docs.sh
T
srawat 69caa62b60 rocprofv3 doc updates (#982)
* updating rocprofv3

* using rocprofv3

* review updates

* naming standardization

* Update source/docs/how-to/using-rocprofv3.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* review comments

* adding API references

* kernel filtering

* Remove Sphinx warn as error

To bypass false warning for linking between rst and md

* remove unused (duplicate) refs in _toc.yml.in

---------

Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>
Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>
Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>
Co-authored-by: Peter Jun Park <peter.park@amd.com>
2024-08-02 14:08:04 -05:00

46 lines
1.3 KiB
Bash
Executable File

#!/bin/bash -e
message()
{
echo -e "\n\n##### ${@}... #####\n"
}
WORK_DIR=$(cd $(dirname ${BASH_SOURCE[0]})/../docs &> /dev/null && pwd)
SOURCE_DIR=$(cd ${WORK_DIR}/../.. &> /dev/null && pwd)
message "Working directory is ${WORK_DIR}"
message "Source directory is ${SOURCE_DIR}"
message "Changing directory to ${SOURCE_DIR}"
cd ${SOURCE_DIR}
message "Configurating cmake..."
cmake -B build-docs ${SOURCE_DIR} -DROCPROFILER_INTERNAL_BUILD_DOCS=ON
message "Changing directory to ${WORK_DIR}"
cd ${WORK_DIR}
message "Generating rocprofiler-sdk.dox"
cmake -DSOURCE_DIR=${SOURCE_DIR} -DPROJECT_NAME="Rocprofiler SDK" -P ${WORK_DIR}/generate-doxyfile.cmake
message "Generating doxygen xml files"
doxygen rocprofiler-sdk.dox
doxygen rocprofiler-sdk.dox
message "Running doxysphinx"
doxysphinx build ${WORK_DIR} ${WORK_DIR}/_build/html ${WORK_DIR}/_doxygen/html
message "Building html documentation"
make html SPHINXOPTS="--keep-going -n"
if [ -d ${SOURCE_DIR}/docs ]; then
message "Removing stale documentation in ${SOURCE_DIR}/docs/"
rm -rf ${SOURCE_DIR}/docs/*
message "Adding nojekyll to docs/"
cp -r ${WORK_DIR}/.nojekyll ${SOURCE_DIR}/docs/.nojekyll
message "Copying source/docs/_build/html/* to docs/"
cp -r ${WORK_DIR}/_build/html/* ${SOURCE_DIR}/docs/
fi