+deptest_make()
+{
+ local target="$1"
+ shift
+ local logfile="$1"
+ shift
+ make -j$nrjobs "$target" \
+ BUILD_DIR="$BUILD_DIR" \
+ BUILD_DIR_HOST="$BUILD_DIR_HOST" \
+ KERNEL_BUILD_DIR="$KERNEL_BUILD_DIR" \
+ BIN_DIR="$BIN_DIR" \
+ STAGING_DIR="$STAGING_DIR" \
+ STAGING_DIR_HOST="$STAGING_DIR_HOST" \
+ FORCE_HOST_INSTALL=1 \
+ V=99 "$@" >"$LOG_DIR/$logfile" 2>&1
+}
+
+clean_kernel_build_dir()
+{
+ # delete everything, except the kernel build dir "linux-X.X.X"
+ (
+ cd "$KERNEL_BUILD_DIR" || die "Failed to enter kernel build dir"
+ for entry in *; do
+ [ -z "$(echo "$entry" | egrep -e '^linux-*.*.*$')" ] || continue
+ rm -rf "$entry" || die "Failed to clean kernel build dir"
+ done
+ )
+}
+
+stamp_exists() # $1=stamp
+{
+ [ -e "$1" -o -L "$1" ]
+}
+