summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-10-06 20:13:10 +0000
committerrillig <rillig@pkgsrc.org>2006-10-06 20:13:10 +0000
commit343b18a86ffc43b1cfc172150be0c07d50e6c5c6 (patch)
tree975548b8f87edb5bfe81402826ed6ce3655d80ec /mk/install
parent7f97aaa2562dde7ff2455421b5a80f342c43075f (diff)
downloadpkgsrc-343b18a86ffc43b1cfc172150be0c07d50e6c5c6.tar.gz
Added more error checking: If a directory is specified in
INSTALLATION_DIRS but a regular file of the same name already exists, the BSD install(1) program doesn't care but exits successfully. To avoid much more confusing error messages, this is checked here, and a _good_ error message is printed.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/install.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/install/install.mk b/mk/install/install.mk
index 4148ee478cc..239e0d806ee 100644
--- a/mk/install/install.mk
+++ b/mk/install/install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.19 2006/10/05 01:10:59 rillig Exp $
+# $NetBSD: install.mk,v 1.20 2006/10/06 20:13:10 rillig Exp $
######################################################################
### install (PUBLIC)
@@ -235,6 +235,10 @@ install-makedirs:
dir=`${ECHO} $$dir | ${SED} "s|^${PREFIX}/||"` ;; \
/*) continue ;; \
esac; \
+ if [ -f "${PREFIX}/$$dir" ]; then \
+ ${ERROR_MSG} "[install.mk] $$dir should be a directory, but is a file."; \
+ exit 1; \
+ fi; \
case "$$dir" in \
*bin|*bin/*|*libexec|*libexec/*) \
${INSTALL_PROGRAM_DIR} ${PREFIX}/$$dir ;; \