summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-15 22:53:57 +0000
committerjlam <jlam@pkgsrc.org>2005-05-15 22:53:57 +0000
commit94ed41f3397867986d9ae6682437533c9ccef401 (patch)
tree7dd4c15d1c40fc628b5c2178796eaa4f1f1c7d9f
parentf6bb82897e80bb46056231a5092fe94e06c07da8 (diff)
downloadpkgsrc-94ed41f3397867986d9ae6682437533c9ccef401.tar.gz
In the tools framework, check that the directory doesn't exist before
creating it in case ${MKDIR} can't handle that situation.
-rw-r--r--mk/tools/bsd.tools.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk
index 99666d3660c..fe8d33652e1 100644
--- a/mk/tools/bsd.tools.mk
+++ b/mk/tools/bsd.tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.22 2005/05/15 03:09:52 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.23 2005/05/15 22:53:57 jlam Exp $
#
# This Makefile fragment creates tools under ${TOOLS_DIR} that are
# found before similarly-named tools in the system path.
@@ -139,7 +139,8 @@ TOOLS_REAL_CMDLINE_DFLT.${_t_}= \
override-tools: ${TOOLS_CMD.${_t_}}
${TOOLS_CMD.${_t_}}:
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H:Q}
+ ${_PKG_SILENT}${_PKG_DEBUG}${TEST} -d ${.TARGET:H:Q} || \
+ ${MKDIR} ${.TARGET:H:Q}
${_PKG_SILENT}${_PKG_DEBUG} \
if ${TEST} -n ${TOOLS_REAL_CMDLINE.${_t_}:Q}""; then \
create=wrapper; \