pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Added more error checking: If a directory i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1dcd539a4015
branches:  trunk
changeset: 519614:1dcd539a4015
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Oct 06 20:13:10 2006 +0000

description:
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:

 mk/install/install.mk |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r cea7a897fb0e -r 1dcd539a4015 mk/install/install.mk
--- a/mk/install/install.mk     Fri Oct 06 20:08:40 2006 +0000
+++ b/mk/install/install.mk     Fri Oct 06 20:13:10 2006 +0000
@@ -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 @@
                        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 ;;       \



Home | Main Index | Thread Index | Old Index