-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Add optional argument for build dir path
The additional optional argument is useful to allow the end user to create multiple build directories for various applications and/or variants. Signed-off-by: Hugues Kamba Mpiana <[email protected]>
- Loading branch information
1 parent
4862547
commit cfa5464
Showing
3 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build: Add custom build directory option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2023 Arm Limited and/or its affiliates | ||
# Copyright 2023-2024 Arm Limited and/or its affiliates | ||
# <[email protected]> | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
@@ -66,10 +66,11 @@ function show_usage { | |
cat <<EOF | ||
Usage: $0 [options] example | ||
Download dependencies, apply patches and build an example. | ||
Apply patches and build an example. | ||
Options: | ||
-h,--help Show this help | ||
-p,--path Path to the build directory | ||
-c,--clean Clean build | ||
-t,--target Build target (corstone300 or corstone310) | ||
--toolchain Compiler (GNU or ARMCLANG) | ||
|
@@ -87,8 +88,8 @@ if [[ $# -eq 0 ]]; then | |
exit 1 | ||
fi | ||
|
||
SHORT=t:,c,h,q | ||
LONG=target:,toolchain:,clean,help,configure-only,certificate_path:,private_key_path:,integration-tests | ||
SHORT=t:,c,h,q,p: | ||
LONG=target:,toolchain:,clean,help,configure-only,certificate_path:,private_key_path:,integration-tests:,path: | ||
OPTS=$(getopt -n build --options $SHORT --longoptions $LONG -- "$@") | ||
|
||
eval set -- "$OPTS" | ||
|
@@ -104,6 +105,10 @@ do | |
CLEAN=1 | ||
shift | ||
;; | ||
-p | --path ) | ||
BUILD_PATH=$2 | ||
shift 2 | ||
;; | ||
-t | --target ) | ||
TARGET=$2 | ||
shift 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2023 Arm Limited and/or its affiliates | ||
# Copyright 2023-2024 Arm Limited and/or its affiliates | ||
# <[email protected]> | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
@@ -31,8 +31,8 @@ Examples: | |
EOF | ||
} | ||
|
||
SHORT=t:,f:,h | ||
LONG=target:,fvp_type:,help | ||
SHORT=t:,f:,h,p: | ||
LONG=target:,fvp_type:,help,path: | ||
OPTS=$(getopt -n run --options $SHORT --longoptions $LONG -- "$@") | ||
|
||
eval set -- "$OPTS" | ||
|
@@ -44,6 +44,10 @@ do | |
show_usage | ||
exit 0 | ||
;; | ||
-p | --path ) | ||
BUILD_PATH=$2 | ||
shift 2 | ||
;; | ||
-t | --target ) | ||
TARGET=$2 | ||
shift 2 | ||
|