Skip to content

Commit 57a81d9

Browse files
authored
[ATfL] Add package documentation (#254)
It's a cherry-pick from the arm-software branch. This patch adds the ATfL package documentation which should land into: 1. Our on-line page(s) 2. Our release .deb packages 3. Our release .rpm packages The markdown documents introduced by this patch have landed into the arm-software/linux/docs directory. This follows the same guidance that has been already agreed for the ATfE product (see [1]). Additionally, an index.md file has been created which follows the convention already observed in the LLVM's documentation directories (e.g., [2]). The files from the arm-software/linux/docs directory are being copied into the arm/docs directory of the tarball and this is happening in the build.sh script also modified by this patch. Whatever lands into that directory, should act as a basis for further rendering of the on-line page(s) and the PDF document(s) in our CI pipelines. [1] https://github.com/arm/arm-toolchain/blob/arm-software/arm-software/docs/README.md [2] https://github.com/arm/arm-toolchain/blob/arm-software/flang/docs/index.md
1 parent 27ee08e commit 57a81d9

File tree

8 files changed

+711
-1
lines changed

8 files changed

+711
-1
lines changed

arm-software/docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ Toolchain for Embedded and Arm Toolchain for Linux.
66
Documentation that is specific to a toolchain should be placed in the
77
toolchain specific subdirectory. For example documentation for Arm
88
Toolchain for Embedded should go into the `arm-software/embedded/docs`
9-
directory.
9+
directory while documentation for Arm Toolchain for Linux should go
10+
into the `arm-software/linux/docs` directory.

arm-software/linux/build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ MKMODULEDIRS_PATH=${MKMODULEDIRS_PATH:-"${BASE_DIR}/mkmoduledirs.sh.var"}
1616
SOURCES_DIR=${SOURCES_DIR:-"$(git -C "${BASE_DIR}" rev-parse --show-toplevel)"}
1717
LIBRARIES_DIR=${LIBRARIES_DIR:-"${BASE_DIR}/lib"}
1818
PATCHES_DIR=${PATCHES_DIR:-"${BASE_DIR}/patches"}
19+
DOCS_DIR=${DOCS_DIR:-"${BASE_DIR}/docs"}
1920
BUILD_DIR=${BUILD_DIR:-"${BASE_DIR}/build"}
2021
ATFL_DIR=${ATFL_DIR:-"${BUILD_DIR}/atfl"}
2122
LOGS_DIR=${LOGS_DIR:-"${BASE_DIR}/logs"}
@@ -186,6 +187,8 @@ Environment Variables:
186187
(default: $LIBRARIES_DIR)
187188
PATCHES_DIR The optional directory where all patches will be stored
188189
(default: $PATCHES_DIR)
190+
DOCS_DIR The directory where ATfL documents will be stored
191+
(default: $DOCS_DIR)
189192
BUILD_DIR The directory where all build output will be stored
190193
(default: $BUILD_DIR)
191194
LOGS_DIR The directory where all build logs will be stored
@@ -386,6 +389,8 @@ package() {
386389
cp "${SBOM_FILE_PATH}" "${ATFL_DIR}/ATfL-SBOM.spdx.json"
387390
mkdir -p "${ATFL_DIR}/arm"
388391
cp "${MKMODULEDIRS_PATH}" "${ATFL_DIR}/arm/mkmoduledirs.sh"
392+
mkdir -p "${ATFL_DIR}/arm/docs"
393+
cp "${DOCS_DIR}"/*.md "${ATFL_DIR}/arm/docs"
389394
sed -i "s/%ATFL_VERSION%/${ATFL_VERSION}/g" "${ATFL_DIR}/arm/mkmoduledirs.sh"
390395
sed -i "s/%ATFL_BUILD%/${BUILD_NUMBER:-"unknown"}/g" "${ATFL_DIR}/arm/mkmoduledirs.sh"
391396
sed -i "s/%ATFL_INSTALL_PREFIX%/\$\(dirname \$\(dirname \`realpath \$BASH_SOURCE\`\)\)/g" "${ATFL_DIR}/arm/mkmoduledirs.sh"
@@ -498,6 +503,12 @@ then
498503
exit 1
499504
fi
500505

506+
if ! [[ -e "${DOCS_DIR}" ]]
507+
then
508+
echo "The documentation directory is configured incorrectly or does not exist."
509+
exit 1
510+
fi
511+
501512
if ! [[ -e "${SOURCES_DIR}" ]]
502513
then
503514
echo "The sources directory is configured incorrectly or does not exist."

arm-software/linux/build.sh-HOWTO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ The `build.sh` script reads the following environment variables:
147147
(default: `arm-software/linux/lib`)
148148
- `PATCHES_DIR` - The **optional** directory where all patches will be stored
149149
(default: `arm-software/linux/patches`)
150+
- `DOCS_DIR` - The directory where ATfL documents will be stored
151+
(default: `arm-software/linux/docs`)
150152
- `BUILD_DIR` - The directory where all build will be happening
151153
(default: `arm-software/linux/build`)
152154
- `LOGS_DIR` - The directory where all build logs will be stored

0 commit comments

Comments
 (0)