mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-06-02 09:46:34 +03:00
Add a -v option to build.sh
This allows for a verbose build, where the commands being called are displayed.
This commit is contained in:
15
build.sh
15
build.sh
@@ -31,6 +31,7 @@ usage()
|
|||||||
echo "Syntax: build.sh -h -f <flags> -j <num>"
|
echo "Syntax: build.sh -h -f <flags> -j <num>"
|
||||||
echo "Options"
|
echo "Options"
|
||||||
echo "-h Display this usage information and exit"
|
echo "-h Display this usage information and exit"
|
||||||
|
echo "-v Verbose build"
|
||||||
echo "-f <flags> Extra build flags to pass to cmake"
|
echo "-f <flags> Extra build flags to pass to cmake"
|
||||||
echo "-j <num> Run num build jobs in parallel"
|
echo "-j <num> Run num build jobs in parallel"
|
||||||
echo
|
echo
|
||||||
@@ -40,14 +41,19 @@ ostype=$(uname | tr '[A-Z]' '[a-z]')
|
|||||||
|
|
||||||
build_flags=""
|
build_flags=""
|
||||||
cmake_build="cmake --build ."
|
cmake_build="cmake --build ."
|
||||||
|
verbose=""
|
||||||
|
jopt=""
|
||||||
|
|
||||||
while getopts :hf:j: OPT; do
|
while getopts :hf:j:v OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
f)
|
f)
|
||||||
build_flags="$OPTARG"
|
build_flags="$OPTARG"
|
||||||
;;
|
;;
|
||||||
j)
|
j)
|
||||||
cmake_build="cmake --build . -- -j$OPTARG";
|
jopt="-- -j$OPTARG"
|
||||||
|
;;
|
||||||
|
v)
|
||||||
|
verbose="-v"
|
||||||
;;
|
;;
|
||||||
h | *)
|
h | *)
|
||||||
usage
|
usage
|
||||||
@@ -57,6 +63,7 @@ while getopts :hf:j: OPT; do
|
|||||||
done
|
done
|
||||||
shift $((OPTIND-1)) # remove parsed options and args from $@ list
|
shift $((OPTIND-1)) # remove parsed options and args from $@ list
|
||||||
|
|
||||||
|
cmake_build="$cmake_build $verbose $jopt"
|
||||||
|
|
||||||
build_type=RelWithDebInfo
|
build_type=RelWithDebInfo
|
||||||
# build_type=Release # no debug info
|
# build_type=Release # no debug info
|
||||||
|
|||||||
Reference in New Issue
Block a user