summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_distclean.subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr/pkg_distclean.subr')
-rw-r--r--subr/pkg_distclean.subr14
1 files changed, 14 insertions, 0 deletions
diff --git a/subr/pkg_distclean.subr b/subr/pkg_distclean.subr
new file mode 100644
index 00000000..aae22162
--- /dev/null
+++ b/subr/pkg_distclean.subr
@@ -0,0 +1,14 @@
+#
+# . ./build.vars and set -o errexit -o noglob are assumed.
+# See warning at the top of build.vars.
+#
+
+pkg_distclean() {
+ if [ "${PKG_SUBDIR}" != "${PKG_BUILD_DIR}" ]; then
+ secure_rm ${PKG_BUILD_DIR};
+ insecure_mkdir ${PKG_BUILD_DIR};
+ fi;
+ set_build_script_done distclean -configure;
+};
+
+# vim:filetype=sh