From 9792310286c5b6ae3cffc5f8e682fda8315ba970 Mon Sep 17 00:00:00 2001 From: thomas-bc Date: Tue, 7 Nov 2023 10:33:26 -0800 Subject: [PATCH] Cleanup some more --- cmake/docs/docs.py | 3 +++ cmake/platform/Linux.cmake | 2 +- docs/UsersGuide/cmake/Targets.md | 2 +- docs/UsersGuide/cmake/cmake-api.md | 10 ++++------ docs/doxygen/generate_docs.bash | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cmake/docs/docs.py b/cmake/docs/docs.py index e38b77d930..0d5c56f370 100755 --- a/cmake/docs/docs.py +++ b/cmake/docs/docs.py @@ -55,6 +55,8 @@ def main(): if not os.path.isdir(sys.argv[1]) or not os.path.isdir(sys.argv[2]): print("[ERROR] Not a directory!") sys.exit(2) + # Print the index header (stdout is redirected to index.md) + print("# CMake API Index") outdir = os.path.abspath(sys.argv[2]) os.chdir(sys.argv[1]) for dirpath, dirnames, filenames in os.walk("."): @@ -84,6 +86,7 @@ def process_file(file_name, outdir): relative_fn = out_fn out_fn = os.path.join(outdir, out_fn) os.makedirs(os.path.dirname(out_fn), exist_ok=True) + # The following print statements are used to generate the index.md file # If parent is not current dir, change CURRENT_DIR and print section header # This conveniently works because os.walk is depth first (used in main()) if Path(file_name).parent != CURRENT_DIR: diff --git a/cmake/platform/Linux.cmake b/cmake/platform/Linux.cmake index 89beac4d55..aef6fea3e4 100644 --- a/cmake/platform/Linux.cmake +++ b/cmake/platform/Linux.cmake @@ -1,7 +1,7 @@ #### # Linux.cmake: # -# Linux platform file for standard linux targets. Merely defers to [./Linux-common.cmake](Linux-common.cmake). +# Linux platform file for standard linux targets. #### # Set platform default for baremetal scheduler drivers if (NOT DEFINED FPRIME_USE_BAREMETAL_SCHEDULER) diff --git a/docs/UsersGuide/cmake/Targets.md b/docs/UsersGuide/cmake/Targets.md index 7b57629927..de8de249c1 100644 --- a/docs/UsersGuide/cmake/Targets.md +++ b/docs/UsersGuide/cmake/Targets.md @@ -19,4 +19,4 @@ as part of the CMake system. These targets are described in the [index](cmake-ap ## Adding Custom Targets -See the [Customization Guide](Customization.md) for a description of adding custom targets. \ No newline at end of file +See the [Customization Guide](Customization.md) for a description of adding custom targets. diff --git a/docs/UsersGuide/cmake/cmake-api.md b/docs/UsersGuide/cmake/cmake-api.md index fe7979bbc0..8baed4f65e 100644 --- a/docs/UsersGuide/cmake/cmake-api.md +++ b/docs/UsersGuide/cmake/cmake-api.md @@ -8,14 +8,16 @@ takes. Users wanting to alter the build should look here. - [API](../api/cmake/API.md): Module API function documentation - [Options](../api/cmake/Options.md): Runtime build options +An index of all available documentation is available at [CMake API Index](../api/cmake/index.md). This documentation is generated from the source code available [here](https://github.com/nasa/fprime/tree/devel/cmake). Below is a description of some of the main API functionalities. + ## Toolchain and Platform Documentation Toolchain files are used to cross-compile F´. In general, standard CMake toolchain files can be used to cross-compile, however; F´ includes several built-in toolchains and a template for writing your own toolchains for F´. -[CMake Toolchain Documentation](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html): CMake's toolchain documentation -[Toolchain Template](../api/cmake/toolchain/toolchain-template.md): Toolchain file template documentation +[CMake Toolchain Documentation](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html): CMake's toolchain documentation +[Toolchain Template](../api/cmake/toolchain/toolchain-template.md): Toolchain file template documentation [raspberrypi](../api/cmake/toolchain/raspberrypi.md): Raspberry PI cross-compile toolchain file Platform files are used to set up F´ for use on specific hardware platforms. This allows users to @@ -44,7 +46,3 @@ improvements to the CMake are needed. Build system architects should consult thi [FPrime-Code](../api/cmake/FPrime-Code.md): F´ framework code inclusions [FPrime](../api/cmake/FPrime.md): F´ project support - - -## CMake Documentation Index - diff --git a/docs/doxygen/generate_docs.bash b/docs/doxygen/generate_docs.bash index 1797cac852..d95923d673 100755 --- a/docs/doxygen/generate_docs.bash +++ b/docs/doxygen/generate_docs.bash @@ -89,7 +89,7 @@ function make_version cd "${FPRIME}" clobber "${CMAKE_OUTPUT}" mkdir -p "${CMAKE_OUTPUT}" - "${FPRIME}/cmake/docs/docs.py" "${FPRIME}/cmake/" "${FPRIME}/docs/UsersGuide/api/cmake" >> "${FPRIME}/docs/UsersGuide/cmake/cmake-api.md" + "${FPRIME}/cmake/docs/docs.py" "${FPRIME}/cmake/" "${CMAKE_OUTPUT}" > "${CMAKE_OUTPUT}/index.md" ) || exit 1 # Fix for github pages