Changes the logic of "rebuild files" so that jhalfs does not stop if this item is ticked and the build dir is empty
This commit is contained in:
parent
608fbe13d0
commit
d7390a52cf
2 changed files with 11 additions and 6 deletions
|
@ -260,7 +260,7 @@ menu "--- BOOK Settings"
|
||||||
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
|
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
|
||||||
default "hppa2.0-unknown-linux-gnu" if PROC_hppa2
|
default "hppa2.0-unknown-linux-gnu" if PROC_hppa2
|
||||||
|
|
||||||
default "arm-unknown-linux-gnueabi" if ARCH_ARM && BOOK_CLFS2
|
default "arm-unknown-linux-gnu" if ARCH_ARM && BOOK_CLFS2
|
||||||
|
|
||||||
default "arm-unknown-linux-uclibc" if PROC_ARM
|
default "arm-unknown-linux-uclibc" if PROC_ARM
|
||||||
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
|
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
|
||||||
|
|
|
@ -46,21 +46,25 @@ run_make() { #
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
clean_builddir() { #
|
clean_builddir() { #
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
# Test if the clean must be done.
|
# Test if the clean must be done.
|
||||||
if [ "${CLEAN}" = "y" ]; then
|
if [ "${CLEAN}" = "y" ]; then
|
||||||
|
# If empty (i.e. could contain lost+found), do not do anything
|
||||||
|
if $(ls $BUILDDIR/* > /dev/null 2>&1) &&
|
||||||
|
[ "$(ls $BUILDDIR)" != "lost+found" ]; then
|
||||||
# Test to make sure that the build directory was populated by jhalfs
|
# Test to make sure that the build directory was populated by jhalfs
|
||||||
if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
|
if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
|
||||||
echo "Looks like $BUILDDIR was not populated by a previous jhalfs run."
|
echo "Looks like $BUILDDIR was not populated by a previous jhalfs run."
|
||||||
exit 1
|
exit 1
|
||||||
# Test that dev filesystems are not mounted in $BUILDDIR
|
# Test that dev filesystems are not mounted in $BUILDDIR
|
||||||
elif mount | grep $BUILDDIR/dev > /dev/null ; then
|
elif mount | grep $BUILDDIR/dev > /dev/null ; then
|
||||||
echo "Looks like kernel fylesystems are yet mounted on $BUILDDIR."
|
echo "Looks like kernel filesystems are still mounted on $BUILDDIR."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# Clean the build directory
|
# Clean the build directory
|
||||||
echo -n "Cleaning $BUILDDIR ..."
|
echo -n "Cleaning $BUILDDIR ..."
|
||||||
# First delete proc and sys directories, if exist.
|
# First delete proc and sys directories, if exist.
|
||||||
# Both should be empty. If not, be sure to exit.
|
# Both should be empty. If not, we exit, and the rmdir command
|
||||||
|
# has generated an error message
|
||||||
if [ -d $BUILDDIR/proc ] ; then
|
if [ -d $BUILDDIR/proc ] ; then
|
||||||
sudo rmdir $BUILDDIR/proc || exit 1
|
sudo rmdir $BUILDDIR/proc || exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -77,6 +81,7 @@ clean_builddir() { #
|
||||||
echo "done"
|
echo "done"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
VERBOSITY2=$VERBOSITY
|
VERBOSITY2=$VERBOSITY
|
||||||
|
|
Reference in a new issue