Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1614, standardize on "docs" subdirectory #1615

Merged
merged 1 commit into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/Makefile.sample
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ lcov:

doc:
$(MAKE) --no-print-directory -C "$(O)" mission-doc
@/bin/echo -e "\n\nDetail Design: \nfile://$(CURDIR)/$(O)/doc/detaildesign/html/index.html\n"
@/bin/echo -e "\n\nDetail Design: \nfile://$(CURDIR)/$(O)/docs/detaildesign/html/index.html\n"

usersguide:
$(MAKE) --no-print-directory -C "$(O)" cfe-usersguide
@/bin/echo -e "\n\ncFE Users Guide: \nfile://$(CURDIR)/$(O)/doc/users_guide/html/index.html\n"
@/bin/echo -e "\n\ncFE Users Guide: \nfile://$(CURDIR)/$(O)/docs/users_guide/html/index.html\n"

osalguide:
$(MAKE) --no-print-directory -C "$(O)" osalguide
Expand Down
4 changes: 2 additions & 2 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,14 @@ function(process_arch SYSVAR)
# Also extract the "-D" options within CFLAGS and inform Doxygen about these
string(REGEX MATCHALL "-D[A-Za-z0-9_=]+" DOXYGEN_DEFINED_MACROS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE "-D" " " DOXYGEN_DEFINED_MACROS "${DOXYGEN_DEFINED_MACROS}")
file(APPEND "${MISSION_BINARY_DIR}/doc/mission-content.doxyfile"
file(APPEND "${MISSION_BINARY_DIR}/docs/mission-content.doxyfile"
"PREDEFINED += ${DOXYGEN_DEFINED_MACROS}\n"
"INPUT += ${MISSION_SOURCE_DIR}/osal/src/os/${OSAL_SYSTEM_OSTYPE}\n"
"INPUT += ${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}\n"
"INPUT += ${CMAKE_BINARY_DIR}/inc")

# Append to usersguide.doxyfile
file(APPEND "${MISSION_BINARY_DIR}/doc/cfe-usersguide.doxyfile"
file(APPEND "${MISSION_BINARY_DIR}/docs/cfe-usersguide.doxyfile"
"INPUT += ${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}/src\n"
"INPUT += ${CMAKE_BINARY_DIR}/inc")

Expand Down
2 changes: 1 addition & 1 deletion cmake/cfe-common.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GENERATE_DEPRECATEDLIST= YES
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
WARN_NO_PARAMDOC = YES
WARN_LOGFILE = @CMAKE_BINARY_DIR@/doc/warnings.log
WARN_LOGFILE = @CMAKE_BINARY_DIR@/docs/warnings.log
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cmake/cfe-usersguide.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/main.dox

# Common definitions, some of which are extended or overridden here.
@INCLUDE = @MISSION_BINARY_DIR@/doc/cfe-common.doxyfile
@INCLUDE = @MISSION_BINARY_DIR@/docs/cfe-common.doxyfile
PROJECT_NAME = "Core Flight Executive Users Guide"
OUTPUT_DIRECTORY = users_guide
GENERATE_LATEX = YES
Expand Down
4 changes: 2 additions & 2 deletions cmake/mission-detaildesign.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#---------------------------------------------------------------------------

# Start with the common definitions, some of which are extended or overridden here.
@INCLUDE = @MISSION_BINARY_DIR@/doc/cfe-common.doxyfile
@INCLUDE = @MISSION_BINARY_DIR@/docs/cfe-common.doxyfile
PROJECT_NAME = "@MISSION_NAME@"
PROJECT_BRIEF = "Core Flight System project built using \"@MISSIONCONFIG@\" configuration"
OUTPUT_DIRECTORY = detaildesign
Expand All @@ -30,4 +30,4 @@ STRIP_FROM_PATH += @MISSION_DEFS@
#---------------------------------------------------------------------------
# The user content doxyfile contains paths to the mission-specific applications
#---------------------------------------------------------------------------
@INCLUDE = @CMAKE_BINARY_DIR@/doc/mission-content.doxyfile
@INCLUDE = @CMAKE_BINARY_DIR@/docs/mission-content.doxyfile
32 changes: 16 additions & 16 deletions cmake/mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,17 @@ function(prepare)

# Doxygen-based documentation generation targets
# Create a directory for documentation output
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/doc")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/docs")

# Generate a customized Doxyfile file for the Doxygen docs.
# This file must be present in the directory where "doxygen" is executed
# If the user has provided a "Doxyfile" in their top level documentation directory,
# then assume they have also set PROJECT_NAME and PROJECT_BRIEF in that.
# Otherwise, generate reasonable strings for these values.
set(MISSION_DOXYFILE_USER_CONTENT)
if (EXISTS "${MISSION_SOURCE_DIR}/doc/Doxyfile")
list(APPEND MISSION_DOXYFILE_USER_CONTENT "@INCLUDE = ${MISSION_SOURCE_DIR}/doc/Doxyfile\n")
endif (EXISTS "${MISSION_SOURCE_DIR}/doc/Doxyfile")
if (EXISTS "${MISSION_SOURCE_DIR}/docs/Doxyfile")
list(APPEND MISSION_DOXYFILE_USER_CONTENT "@INCLUDE = ${MISSION_SOURCE_DIR}/docs/Doxyfile\n")
endif (EXISTS "${MISSION_SOURCE_DIR}/docs/Doxyfile")

foreach(APP ${MISSION_DEPS})
# OSAL is handled specially, as only part of it is used
Expand All @@ -253,8 +253,8 @@ function(prepare)
# If the module provides its own doxyfile, then include it directly
# This allows for app-specific fine-tuning of the sources, based on its own source tree
configure_file("${${APP}_MISSION_DIR}/docs/${APP}.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/${APP}.doxyfile")
list(APPEND MISSION_DOXYFILE_USER_CONTENT "@INCLUDE = ${CMAKE_BINARY_DIR}/doc/${APP}.doxyfile\n")
"${CMAKE_BINARY_DIR}/docs/${APP}.doxyfile")
list(APPEND MISSION_DOXYFILE_USER_CONTENT "@INCLUDE = ${CMAKE_BINARY_DIR}/docs/${APP}.doxyfile\n")
else()
# Otherwise just add this entire directory to the "INPUT" list
list(APPEND MISSION_DOXYFILE_USER_CONTENT "INPUT += ${${APP}_MISSION_DIR}\n")
Expand All @@ -263,20 +263,20 @@ function(prepare)
endforeach()

# In all cases it is assumed to include the CFE documentation as well (could be configurable?)
file(WRITE "${CMAKE_BINARY_DIR}/doc/mission-content.doxyfile"
file(WRITE "${CMAKE_BINARY_DIR}/docs/mission-content.doxyfile"
${MISSION_DOXYFILE_USER_CONTENT})

configure_file("${CFE_SOURCE_DIR}/cmake/cfe-common.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/cfe-common.doxyfile")
"${CMAKE_BINARY_DIR}/docs/cfe-common.doxyfile")

configure_file("${CFE_SOURCE_DIR}/cmake/mission-detaildesign.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/mission-detaildesign.doxyfile")
"${CMAKE_BINARY_DIR}/docs/mission-detaildesign.doxyfile")

# Generate an "empty" osconfig.h file for doxygen purposes
# this does not have the actual user-defined values, but will
# have the documentation associated with each macro definition.
configure_file("${osal_MISSION_DIR}/osconfig.h.in"
"${CMAKE_BINARY_DIR}/doc/osconfig-example.h")
"${CMAKE_BINARY_DIR}/docs/osconfig-example.h")

# The user guide should include the doxygen from the _public_ API files from CFE + OSAL
# NOTE: the userguide is built against the headers of the default core apps. Even if
Expand All @@ -290,28 +290,28 @@ function(prepare)
endforeach()
file(GLOB MISSION_USERGUIDE_HEADERFILES
${SUBMODULE_HEADER_PATHS}
"${CMAKE_BINARY_DIR}/doc/osconfig-example.h"
"${CMAKE_BINARY_DIR}/docs/osconfig-example.h"
)

string(REPLACE ";" " \\\n" MISSION_USERGUIDE_HEADERFILES "${MISSION_USERGUIDE_HEADERFILES}")

configure_file("${CFE_SOURCE_DIR}/cmake/cfe-usersguide.doxyfile.in"
"${CMAKE_BINARY_DIR}/doc/cfe-usersguide.doxyfile")
"${CMAKE_BINARY_DIR}/docs/cfe-usersguide.doxyfile")

add_custom_target(mission-doc
doxygen mission-detaildesign.doxyfile
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc")
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs")

add_custom_target(cfe-usersguide
doxygen cfe-usersguide.doxyfile
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc")
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs")

# OSAL API GUIDE include PUBLIC API
set(OSAL_API_INCLUDE_DIRECTORIES
"${osal_MISSION_DIR}/src/os/inc"
"${CMAKE_BINARY_DIR}/doc"
"${CMAKE_BINARY_DIR}/docs"
)
add_subdirectory(${osal_MISSION_DIR}/doc/src ${CMAKE_BINARY_DIR}/doc/osalguide)
add_subdirectory(${osal_MISSION_DIR}/docs/src ${CMAKE_BINARY_DIR}/docs/osalguide)
add_custom_target(osalguide)
add_dependencies(osalguide osal-apiguide)

Expand Down