mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 05:36:23 +02:00
handle/make/file: do multiple project arguments
At the end of the function, this script will now run itself again if there are more arguments. This enables the following: ./handle make file -c project1 project2 project3 Whereas previously, it could only do this: ./handle make file -c project1 Substitude -b and it's the same. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -107,21 +107,10 @@ purge_files()
|
|||||||
for p in u-boot seabios coreboot; do
|
for p in u-boot seabios coreboot; do
|
||||||
x_ ./handle make config -c "${p}"
|
x_ ./handle make config -c "${p}"
|
||||||
done
|
done
|
||||||
for p in bios_extract flashrom grub uefitool; do
|
x_ ./handle make file -c bios_extract flashrom grub uefitool \
|
||||||
x_ ./handle make file -c "${p}"
|
util-fw/stm32-vserprog util-fw/stm32-vserprog/libopencm3 \
|
||||||
done
|
memtest86plus/build* util/* \
|
||||||
for p in "stm32-vserprog" "stm32-vserprog/libopencm3"; do
|
|
||||||
x_ ./handle make file -c "util-fw/${p}"
|
|
||||||
done
|
|
||||||
for p in 32 64; do
|
|
||||||
x_ ./handle make file -c "memtest86plus/build${p}"
|
|
||||||
done
|
|
||||||
for p in "nvmutil" "spkmodem_recv" "e6400-flash-unlock"; do
|
|
||||||
x_ make clean -C "util/${p}"
|
|
||||||
done
|
|
||||||
for p in ${trees_fetch_list}; do
|
|
||||||
x_ rm -Rf "${p}/${p}" "${p}"/*/.git*
|
|
||||||
done
|
|
||||||
x_ rm -Rf .git* */.git* */*/.git* */*/*/.git* */*/*/*/.git* \
|
x_ rm -Rf .git* */.git* */*/.git* */*/*/.git* */*/*/*/.git* \
|
||||||
*/*/*/*/*/.git* */*/*/*/*/*/.git* */*/*/*/*/*/*/.git*
|
*/*/*/*/*/.git* */*/*/*/*/*/.git* */*/*/*/*/*/*/.git*
|
||||||
x_ rm -Rf cbutils elf util-fw/rp2040/pico-serprog/build
|
x_ rm -Rf cbutils elf util-fw/rp2040/pico-serprog/build
|
||||||
|
|||||||
@@ -7,13 +7,14 @@ set -u -e
|
|||||||
|
|
||||||
. "include/err.sh"
|
. "include/err.sh"
|
||||||
|
|
||||||
eval "$(setvars "" mode project)"
|
eval "$(setvars "" mode project _flag)"
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
while getopts b:c: option
|
while getopts b:c: option
|
||||||
do
|
do
|
||||||
case "${1}" in
|
_flag="${1}"
|
||||||
|
case "${_flag}" in
|
||||||
-b) : ;;
|
-b) : ;;
|
||||||
-c) mode="distclean" ;;
|
-c) mode="distclean" ;;
|
||||||
*) err "Invalid option" ;;
|
*) err "Invalid option" ;;
|
||||||
@@ -25,6 +26,7 @@ main()
|
|||||||
|
|
||||||
handle_dependencies
|
handle_dependencies
|
||||||
run_make_command
|
run_make_command
|
||||||
|
[ $# -gt 0 ] && x_ ./handle make file ${_flag} ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_dependencies()
|
handle_dependencies()
|
||||||
@@ -47,7 +49,7 @@ run_make_command()
|
|||||||
x_ make -C "${project}" -j$(nproc)
|
x_ make -C "${project}" -j$(nproc)
|
||||||
else
|
else
|
||||||
x_ make -C "${project}" clean
|
x_ make -C "${project}" clean
|
||||||
make -C "${project}" distclean || :
|
make -C "${project}" distclean 2>/dev/null || :
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user