diff --git a/.github/workflows/build-osal-documentation.yml b/.github/workflows/build-osal-documentation.yml index 84f65eb06..32dd8ff7d 100644 --- a/.github/workflows/build-osal-documentation.yml +++ b/.github/workflows/build-osal-documentation.yml @@ -41,8 +41,8 @@ jobs: - name: Build OSAL API Guide run: | - make osal-apiguide > make_osal-apiguide_stdout.txt 2> make_osal-apiguide_stderr.txt - mv build/docs/osal-apiguide-warnings.log osal-apiguide-warnings.log + make osal-apiguide 2>&1 > make_osal-apiguide_stdout.txt | tee make_osal-apiguide_stderr.txt + mv build/docs/osal-apiguide-warnings.log osal-apiguide-warnings.log - name: Archive Osal Guide Build Logs uses: actions/upload-artifact@v2 @@ -65,4 +65,4 @@ jobs: if [[ -s osal-apiguide-warnings.log ]]; then cat osal-apiguide-warnings.log exit -1 - fi \ No newline at end of file + fi diff --git a/docs/src/CMakeLists.txt b/docs/src/CMakeLists.txt index 0637529bc..c257dc0b0 100644 --- a/docs/src/CMakeLists.txt +++ b/docs/src/CMakeLists.txt @@ -68,17 +68,25 @@ endif () # Generate the list of actual header files from the directories specified. This is done # as a target that runs a separate script such that generator expressions can be evaluated. # This is done as a custom target such that it runs and gets updated every build -add_custom_target(osal_public_api_headerlist +add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/docs/osal-public-api.doxyfile" COMMAND ${CMAKE_COMMAND} -DINCLUDE_DIRECTORIES="${OSAL_API_INCLUDE_DIRECTORIES}" -DCOMPILE_DEFINITIONS="${OSAL_API_COMPILE_DEFINITIONS}" -DINPUT_TEMPLATE="${CMAKE_CURRENT_SOURCE_DIR}/osal-public-api.doxyfile.in" -DOUTPUT_FILE="${CMAKE_BINARY_DIR}/docs/osal-public-api.doxyfile" -P "${CMAKE_CURRENT_SOURCE_DIR}/generate-public-api-doxyfile.cmake" - BYPRODUCTS "${CMAKE_BINARY_DIR}/docs/osal-public-api.doxyfile" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) +add_custom_target(osal_public_api_headerlist + DEPENDS "${CMAKE_BINARY_DIR}/docs/osal-public-api.doxyfile") + +# if building as part of CFS, then generate the doxygen header list as part of the prebuild step +# The "doc-prebuild" target is defined by the CFS build, and thus will not exist if building standalone +if (TARGET doc-prebuild) + add_dependencies(doc-prebuild osal_public_api_headerlist) +endif () + file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/osal-apiguide-warnings.log OSAL_NATIVE_LOGFILE) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/docs/osal-common.doxyfile OSAL_NATIVE_COMMON_CFGFILE) file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/osal-apiguide.doxyfile OSAL_NATIVE_APIGUIDE_CFGFILE)