Dosyalar
rocm-systems/source/scripts/update-docs.sh
T
Jonathan R. Madsen 3769bb7dbf Minor documentation workflow updates (#53)
* Document rocprofiler version defines

- write doxygen for preprocessor defines
- make ROCPROFILER_SOVERSION number similar to  ROCPROFILER_VERSION
- remove ROCPROFILER_COMPILER_STRING

* Update rocprofiler.dox.in

- reformatted
- include rocprofiler/version.h in doxygen
- tweaked dot settings, e.g. made dot SVGs non-interactive

* Update scripts/update-docs.sh

- configure with cmake ROCPROFILER_INTERNAL_BUILD_DOCS=ON which just generates version.h and exits

* Update CMakeLists.txt

- support ROCPROFILER_INTERNAL_BUILD_DOCS=ON option for generating version.h and exiting
2023-09-13 19:14:23 -05:00

46 satır
1.2 KiB
Bash
Çalıştırılabilir Dosya

#!/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.dox"
cmake -DSOURCE_DIR=${SOURCE_DIR} -P ${WORK_DIR}/generate-doxyfile.cmake
message "Generating doxygen xml files"
doxygen rocprofiler.dox
doxygen rocprofiler.dox
message "Running doxysphinx"
doxysphinx build ${WORK_DIR} ${WORK_DIR}/_build/html ${WORK_DIR}/_doxygen/html
message "Building html documentation"
make html SPHINXOPTS="-W --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