diff options
author | rillig <rillig> | 2006-10-06 20:13:10 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-10-06 20:13:10 +0000 |
commit | 6213bc2593347ccd24b2d765a7326f5341b77b1f (patch) | |
tree | 975548b8f87edb5bfe81402826ed6ce3655d80ec /mk | |
parent | a2b5953b85edd7fc6c1727d5cb37ffb096b6827f (diff) | |
download | pkgsrc-6213bc2593347ccd24b2d765a7326f5341b77b1f.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')
-rw-r--r-- | mk/install/install.mk | 6 |
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 ;; \ |