Skip to content

Commit

Permalink
Merge pull request #1341 from jphickey/fix-1339-doc-dependencies
Browse files Browse the repository at this point in the history
Fix #1339, add doc-prebuild dependency
  • Loading branch information
dzbaker committed Dec 6, 2022
2 parents 986b455 + 057a371 commit 2ff34b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-osal-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v3
Expand Down
12 changes: 10 additions & 2 deletions docs/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2ff34b4

Please sign in to comment.