mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
Merge pull request #2518 from MilhouseVH/le90_save_build_config
buildsystem: save/load build config, simplify clean and build --all
This commit is contained in:
commit
15c3e9e90c
@ -765,6 +765,22 @@ check_path() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
load_build_config() {
|
||||||
|
if [ -d "${1}" -a -f ${1}/.build.conf ]; then
|
||||||
|
source ${1}/.build.conf
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
save_build_config() {
|
||||||
|
local var
|
||||||
|
rm -f ${BUILD}/.build.conf
|
||||||
|
for var in PROJECT DEVICE ARCH DEBUG BUILD_SUFFIX; do
|
||||||
|
echo "export ${var}=\"${!var}\"" >> ${BUILD}/.build.conf
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
check_config() {
|
check_config() {
|
||||||
dashes="==========================="
|
dashes="==========================="
|
||||||
if [ ! -d $PROJECT_DIR/$PROJECT ]; then
|
if [ ! -d $PROJECT_DIR/$PROJECT ]; then
|
||||||
|
@ -20,6 +20,15 @@
|
|||||||
|
|
||||||
. config/options $1
|
. config/options $1
|
||||||
|
|
||||||
|
if [ "$1" = "--all" ]; then
|
||||||
|
if [ ! -z "$2" ]; then
|
||||||
|
for build_dir in $(ls -1d ${ROOT}/build.*); do
|
||||||
|
load_build_config ${build_dir} && ./scripts/build $2
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "usage: $0 package_name[:<host|target|init|bootstrap>]"
|
echo "usage: $0 package_name[:<host|target|init|bootstrap>]"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -48,14 +48,8 @@ clean_package() {
|
|||||||
|
|
||||||
if [ "$1" = "--all" ]; then
|
if [ "$1" = "--all" ]; then
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
for PROJECT in $(ls -1 projects); do
|
for build_dir in $(ls -1d ${ROOT}/build.*); do
|
||||||
for archfile in projects/$PROJECT/linux/linux.*.conf; do
|
load_build_config "${build_dir}" && ./scripts/clean $2
|
||||||
if [ ! -f "$archfile" ]; then
|
|
||||||
archfile="$(ls -1 projects/$PROJECT/linux/*/linux.*.conf | head -1)"
|
|
||||||
fi
|
|
||||||
ARCH=`echo $archfile | sed -n '$s/\.conf//;$s/.*\.//p'`
|
|
||||||
PROJECT=$PROJECT ARCH=$ARCH ./scripts/clean $2
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -25,6 +25,8 @@ unset _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL _DEBUG_DEPENDS_LIST _DEBUG_PACK
|
|||||||
. config/show_config
|
. config/show_config
|
||||||
show_config
|
show_config
|
||||||
|
|
||||||
|
save_build_config
|
||||||
|
|
||||||
setup_toolchain target
|
setup_toolchain target
|
||||||
|
|
||||||
$SCRIPTS/checkdeps
|
$SCRIPTS/checkdeps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user