summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_build_dir.subr
blob: 1e46323e2e9c6969294d0fca3cec2b0a4e064d3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# . ./build.vars and set -o errexit -o noglob are assumed.
# See warning at the top of build.vars.
#

pkg_build_dir() {
	if [ -z "${PKG_BUILD_DIR}" ]; then
		set_build_dir ${PKG_SUBDIR} ${PKG_BUILD_TYPE:-native};
	fi;
	[ "${PKG_SUBDIR}" != "${PKG_BUILD_DIR}" ] &&\
		secure_rm ${PKG_BUILD_DIR};
		insecure_mkdir ${PKG_BUILD_DIR};
	set_build_script_done build_dir -patch_pre;
};

# vim:filetype=sh