diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a00daa177..891c0684ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: command: python3 -m pytest --verbose tests/test_code_conventions.py - run: name: Check that doxygen can parse the documentation - command: mkdir -p build/docs && ./scripts/run_doxygen.sh doxygen docs/.Doxyfile + command: mkdir -p build/docs && ./scripts/run_doxygen.sh doxygen docs/.Doxyfile build/docs buildcheck: description: Test that we can build a single KEM/Signature pair as part of a minimal build. diff --git a/CMakeLists.txt b/CMakeLists.txt index 52481ed11c..1d197e655c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,7 @@ if(NOT ${OQS_BUILD_ONLY_LIB}) set(DOXYFILE ${PROJECT_SOURCE_DIR}/docs/.Doxyfile) add_custom_target( gen_docs - COMMAND ${PROJECT_SOURCE_DIR}/scripts/run_doxygen.sh ${DOXYGEN_EXECUTABLE} ${DOXYFILE} + COMMAND ${PROJECT_SOURCE_DIR}/scripts/run_doxygen.sh ${DOXYGEN_EXECUTABLE} ${DOXYFILE} ${PROJECT_BINARY_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMENT "Generate API documentation with Doxygen." USES_TERMINAL) diff --git a/docs/.Doxyfile b/docs/.Doxyfile index 421ddd3b30..20b3d9d16f 100644 --- a/docs/.Doxyfile +++ b/docs/.Doxyfile @@ -58,7 +58,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 = build/docs +OUTPUT_DIRECTORY = $(DOXYGEN_DESTIONATION_DIR) # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and diff --git a/scripts/run_doxygen.sh b/scripts/run_doxygen.sh index 7cca0bc197..3faa64cf75 100755 --- a/scripts/run_doxygen.sh +++ b/scripts/run_doxygen.sh @@ -2,8 +2,8 @@ # SPDX-License-Identifier: MIT -if [ "$#" -ne 2 ]; then - echo "Wrong number of arguments: Expecting path to doxygen binary and doxygen file. Exiting." +if [ "$#" -ne 3 ]; then + echo "Wrong number of arguments: Expecting path to doxygen binary, path to doxygen file, and destination directory. Exiting." exit 1 fi @@ -14,7 +14,8 @@ cp CONFIGURE.md CONFIGURE.md-orig python3 scripts/doxyfy.py CONFIGURE.md-orig CONFIGURE.md # run doxygen: -$1 $2 +mkdir -p "$3/docs" +env DOXYGEN_DESTIONATION_DIR="$3/docs" "$1" "$2" EXITCODE=$? # undo the Github Markdown reformatting