tools/refresh.sh: restore BOARD_DIR when refresh with a different host
There is case as below: When do testbuild under Linux host, such as './tools/configure.sh stmf4discovery:nsh', arch/arm/src/board is a symlink to boards/arm/stm32/stm32f3discovery/src. Then do './tools/refresh.sh --silent stmf4discovery:nsh' after build, it would break the board symlink with copydir.sh instead of link.sh since defconfig with Windows host config. So call sethost.sh to restore BOARD_DIR. Or it results in 'make distclean' not correctly. Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
parent
23389215bb
commit
97afe1c402
@ -235,13 +235,13 @@ for CONFIG in ${CONFIGS}; do
|
||||
# Then run oldconfig or oldefconfig
|
||||
|
||||
if [ "X${defaults}" == "Xy" ]; then
|
||||
if [ "X${debug}" = "Xy" ]; then
|
||||
if [ "X${debug}" == "Xy" ]; then
|
||||
make olddefconfig V=1
|
||||
else
|
||||
make olddefconfig 1>/dev/null
|
||||
fi
|
||||
else
|
||||
if [ "X${debug}" = "Xy" ]; then
|
||||
if [ "X${debug}" == "Xy" ]; then
|
||||
make oldconfig V=1
|
||||
else
|
||||
make oldconfig 1>/dev/null
|
||||
@ -251,7 +251,7 @@ for CONFIG in ${CONFIGS}; do
|
||||
|
||||
# Run savedefconfig to create the new defconfig file
|
||||
|
||||
if [ "X${debug}" = "Xy" ]; then
|
||||
if [ "X${debug}" == "Xy" ]; then
|
||||
make savedefconfig V=1
|
||||
else
|
||||
make savedefconfig 1>/dev/null
|
||||
@ -285,15 +285,21 @@ for CONFIG in ${CONFIGS}; do
|
||||
|
||||
# Restore any previous .config and Make.defs files
|
||||
|
||||
if [ -e SAVEconfig ]; then
|
||||
mv SAVEconfig .config || \
|
||||
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
|
||||
fi
|
||||
|
||||
if [ -e SAVEMake.defs ]; then
|
||||
mv SAVEMake.defs Make.defs || \
|
||||
{ echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; }
|
||||
fi
|
||||
|
||||
if [ -e SAVEconfig ]; then
|
||||
mv SAVEconfig .config || \
|
||||
{ echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; }
|
||||
|
||||
if [ "X${debug}" == "Xy" ]; then
|
||||
./tools/sethost.sh V=1
|
||||
else
|
||||
./tools/sethost.sh 1>/dev/null
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exit $diff
|
||||
|
Loading…
x
Reference in New Issue
Block a user