buildsystem: save/load build config

This commit is contained in:
MilhouseVH 2018-02-22 11:49:49 +00:00
parent 922331214c
commit 1a6d8a8f06
2 changed files with 18 additions and 0 deletions

View File

@ -765,6 +765,22 @@ check_path() {
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() {
dashes="==========================="
if [ ! -d $PROJECT_DIR/$PROJECT ]; then

View File

@ -25,6 +25,8 @@ unset _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL _DEBUG_DEPENDS_LIST _DEBUG_PACK
. config/show_config
show_config
save_build_config
setup_toolchain target
$SCRIPTS/checkdeps