Skip to content
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
3 changes: 2 additions & 1 deletion arm-software/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Toolchain for Embedded and Arm Toolchain for Linux.
Documentation that is specific to a toolchain should be placed in the
toolchain specific subdirectory. For example documentation for Arm
Toolchain for Embedded should go into the `arm-software/embedded/docs`
directory.
directory while documentation for Arm Toolchain for Linux should go
into the `arm-software/linux/docs` directory.
11 changes: 11 additions & 0 deletions arm-software/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ MKMODULEDIRS_PATH=${MKMODULEDIRS_PATH:-"${BASE_DIR}/mkmoduledirs.sh.var"}
SOURCES_DIR=${SOURCES_DIR:-"$(git -C "${BASE_DIR}" rev-parse --show-toplevel)"}
LIBRARIES_DIR=${LIBRARIES_DIR:-"${BASE_DIR}/lib"}
PATCHES_DIR=${PATCHES_DIR:-"${BASE_DIR}/patches"}
DOCS_DIR=${DOCS_DIR:-"${BASE_DIR}/docs"}
BUILD_DIR=${BUILD_DIR:-"${BASE_DIR}/build"}
ATFL_DIR=${ATFL_DIR:-"${BUILD_DIR}/atfl"}
LOGS_DIR=${LOGS_DIR:-"${BASE_DIR}/logs"}
Expand Down Expand Up @@ -186,6 +187,8 @@ Environment Variables:
(default: $LIBRARIES_DIR)
PATCHES_DIR The optional directory where all patches will be stored
(default: $PATCHES_DIR)
DOCS_DIR The directory where ATfL documents will be stored
(default: $DOCS_DIR)
BUILD_DIR The directory where all build output will be stored
(default: $BUILD_DIR)
LOGS_DIR The directory where all build logs will be stored
Expand Down Expand Up @@ -384,6 +387,8 @@ package() {
cp "${SBOM_FILE_PATH}" "${ATFL_DIR}/ATfL-SBOM.spdx.json"
mkdir -p "${ATFL_DIR}/arm"
cp "${MKMODULEDIRS_PATH}" "${ATFL_DIR}/arm/mkmoduledirs.sh"
mkdir -p "${ATFL_DIR}/arm/docs"
cp "${DOCS_DIR}"/*.md "${ATFL_DIR}/arm/docs"
sed -i "s/%ATFL_VERSION%/${ATFL_VERSION}/g" "${ATFL_DIR}/arm/mkmoduledirs.sh"
sed -i "s/%ATFL_BUILD%/${BUILD_NUMBER:-"unknown"}/g" "${ATFL_DIR}/arm/mkmoduledirs.sh"
sed -i "s/%ATFL_INSTALL_PREFIX%/\$\(dirname \$\(dirname \`realpath \$BASH_SOURCE\`\)\)/g" "${ATFL_DIR}/arm/mkmoduledirs.sh"
Expand Down Expand Up @@ -500,6 +505,12 @@ then
exit 1
fi

if ! [[ -e "${DOCS_DIR}" ]]
then
echo "The documentation directory is configured incorrectly or does not exist."
exit 1
fi

if ! [[ -e "${SOURCES_DIR}" ]]
then
echo "The sources directory is configured incorrectly or does not exist."
Expand Down
2 changes: 2 additions & 0 deletions arm-software/linux/build.sh-HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ The `build.sh` script reads the following environment variables:
(default: `arm-software/linux/lib`)
- `PATCHES_DIR` - The **optional** directory where all patches will be stored
(default: `arm-software/linux/patches`)
- `DOCS_DIR` - The directory where ATfL documents will be stored
(default: `arm-software/linux/docs`)
- `BUILD_DIR` - The directory where all build will be happening
(default: `arm-software/linux/build`)
- `LOGS_DIR` - The directory where all build logs will be stored
Expand Down
Loading