Skip to content

Commit

Permalink
Cleanup some more
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Nov 7, 2023
1 parent 9b418d8 commit 9792310
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
3 changes: 3 additions & 0 deletions cmake/docs/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("."):
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion cmake/platform/Linux.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/UsersGuide/cmake/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
See the [Customization Guide](Customization.md) for a description of adding custom targets.
10 changes: 4 additions & 6 deletions docs/UsersGuide/cmake/cmake-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

2 changes: 1 addition & 1 deletion docs/doxygen/generate_docs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9792310

Please sign in to comment.