From 343b18a86ffc43b1cfc172150be0c07d50e6c5c6 Mon Sep 17 00:00:00 2001 From: rillig Date: Fri, 6 Oct 2006 20:13:10 +0000 Subject: 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. --- mk/install/install.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mk/install/install.mk') 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 ;; \ -- cgit v1.2.3