aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Ferrell <major@homeonderanged.org>2014-04-16 09:04:34 -0700
committerMark Ferrell <major@homeonderanged.org>2014-04-16 09:04:34 -0700
commitc39bfbc7136f275b989595d86e18a05ec231a439 (patch)
tree242516919525e7e61b2284bae6746c579684ca54
parentd4339125f3e9da987744c3e7db09670b5189f033 (diff)
Rewrite make-distclean as a wrapper to make-clean
-rwxr-xr-xlibexec/build-make-clean2
-rwxr-xr-xlibexec/build-make-distclean28
2 files changed, 6 insertions, 24 deletions
diff --git a/libexec/build-make-clean b/libexec/build-make-clean
index 8c5834d..285d80e 100755
--- a/libexec/build-make-clean
+++ b/libexec/build-make-clean
@@ -5,7 +5,6 @@ build_make_clean()
load_rules "${1}"
if [ -z "${NOCLEAN}" ]; then
- echo "cleaning: ${1}"
if [ -f "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" ]; then
rm "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" &
fi
@@ -30,6 +29,7 @@ build_make_clean()
if test "${BUILDER_CALL_STACK}" = '__main__'; then
simple_usage 'clean' '[all|[<category>/]<package|all>]' "$@"
+ echo "cleaning: ${1}"
build_make_clean "${@}"
fi
diff --git a/libexec/build-make-distclean b/libexec/build-make-distclean
index f3cc91a..2be17a8 100755
--- a/libexec/build-make-distclean
+++ b/libexec/build-make-distclean
@@ -2,33 +2,15 @@
build_make_distclean()
{(
- echo "distcleaning: ${1}"
- load_rules "${1}"
-
- if [ -f "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" ]; then
- rm "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" &
- fi
- if [ -f "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then
- cd "${SYSROOT}"
- # FIXME: we are failing to handle file collisions produce in
- # this file.
- cat "var/db/binpkgs/${CATEGORY}/${NAME}" | xargs -0 rm -f &
- fi
-
- if [ -d "${BUILDER_TMPDIR}/${CATEGORY}/${NAME}" ]; then
- rm -rf "${BUILDER_TMPDIR}/${CATEGORY}/${NAME}" &
- fi
-
- wait
-
- # Clobber our package marker.
- if [ -f "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then
- rm "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}"
- fi
+ import build-make-clean
+ unset NOCLEAN
+ export NOCLEAN
+ build_make_clean "${1}"
)}
if test "${BUILDER_CALL_STACK}" = '__main__'; then
simple_usage 'distclean' '[all|[<category>/]<package|all>]' "$@"
+ echo "distcleaning: ${1}"
build_make_distclean "${@}"
fi