build: route the cleaning of individual sets through clean target

This commit is contained in:
Franco Fichtner 2015-05-16 13:25:53 +02:00
parent 1ae0487e3d
commit bcc68c8bd6
7 changed files with 28 additions and 14 deletions

View File

@ -19,4 +19,3 @@ ${BUILDSCRIPT}:
@cd build && sh ./${.TARGET}.sh \ @cd build && sh ./${.TARGET}.sh \
-f ${FLAVOUR} -n ${NAME} -v ${VERSION} ${ARGS} -f ${FLAVOUR} -n ${NAME} -v ${VERSION} ${ARGS}
.endfor .endfor

View File

@ -132,7 +132,10 @@ via the clean script:
Available options are: Available options are:
* images: remove all available images * images: remove all available images
* obj: reset the kernel/base build directory * obj: reset the kernel/base build directory
* sets: remove all available sets * kernel: remove the kernel set
* stage: reset the main staging area * base: remove the base set
* packages: remove the packages set
* release: remove the release set
* stage: reset the main staging area

View File

@ -29,7 +29,7 @@ set -e
. ./common.sh && $(${SCRUB_ARGS}) . ./common.sh && $(${SCRUB_ARGS})
rm -f ${SETSDIR}/base-*-${ARCH}.txz ./clean.sh base
git_clear ${SRCDIR} git_clear ${SRCDIR}
git_describe ${SRCDIR} git_describe ${SRCDIR}

View File

@ -38,12 +38,24 @@ for ARG in ${@}; do
setup_stage /usr/obj setup_stage /usr/obj
;; ;;
images) images)
echo ">>> Removing ${IMAGESDIR}" echo ">>> Removing images"
rm -rf ${IMAGESDIR} rm -rf ${IMAGESDIR}
;; ;;
sets) kernel)
echo ">>> Removing ${SETSDIR}" echo ">>> Removing kernel set"
rm -rf ${SETSDIR} rm -f ${SETSDIR}/kernel-*-${ARCH}.txz
;;
base)
echo ">>> Removing base set"
rm -f ${SETSDIR}/base-*-${ARCH}.txz
;;
packages)
echo ">>> Removing packages set"
rm -f ${SETSDIR}/packages-*_${PRODUCT_FLAVOUR}-${ARCH}.tar
;;
release)
echo ">>> Removing release set"
rm -f ${SETSDIR}/release-*_${PRODUCT_FLAVOUR}-${ARCH}.tar
;; ;;
esac esac
done done

View File

@ -50,7 +50,7 @@ while getopts n:f:v: OPT; do
esac esac
done done
if [ -z "${PRODUCT_NAME}" -o -z "${PRODUCT_FLAVOUR}" -o -z "${PRODUCT_VERSION}"]; then if [ -z "${PRODUCT_NAME}" -o -z "${PRODUCT_FLAVOUR}" -o -z "${PRODUCT_VERSION}" ]; then
echo "Oops, please use the make targets to execute the build step." >&2 echo "Oops, please use the make targets to execute the build step." >&2
exit 1 exit 1
fi fi
@ -259,7 +259,7 @@ install_packages()
bundle_packages() bundle_packages()
{ {
rm -f ${SETSDIR}/packages-*_${PRODUCT_FLAVOUR}-${ARCH}.tar sh ./clean.sh packages
# rebuild expected FreeBSD structure # rebuild expected FreeBSD structure
mkdir -p ${1}/pkg-repo/Latest mkdir -p ${1}/pkg-repo/Latest

View File

@ -29,7 +29,7 @@ set -e
. ./common.sh && $(${SCRUB_ARGS}) . ./common.sh && $(${SCRUB_ARGS})
rm -f ${SETSDIR}/kernel-*-${ARCH}.txz ./clean.sh kernel
git_clear ${SRCDIR} git_clear ${SRCDIR}
git_describe ${SRCDIR} git_describe ${SRCDIR}

View File

@ -40,7 +40,7 @@ if [ -n "${1}" ]; then
fi fi
fi fi
rm -f ${SETSDIR}/release-*_${PRODUCT_FLAVOUR}-${ARCH}.tar sh ./clean.sh release images
echo ">>> Creating images for ${PRODUCT_RELEASE}" echo ">>> Creating images for ${PRODUCT_RELEASE}"