pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/install
Module Name: pkgsrc
Committed By: jlam
Date: Tue Aug 8 17:17:25 UTC 2017
Modified Files:
pkgsrc/mk/install: install.mk
Log Message:
Check, don't assert, that INSTALLATION_DIRS are all in ${PREFIX}.
Change the assertion into an install-time check that the paths
listed in INSTALLATION_DIRS are relative paths or are in ${PREFIX}.
This delays the check so that some common variables used when
listing directories in INSTALLATION_DIRS are fully-expanded.
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 pkgsrc/mk/install/install.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/install/install.mk
diff -u pkgsrc/mk/install/install.mk:1.71 pkgsrc/mk/install/install.mk:1.72
--- pkgsrc/mk/install/install.mk:1.71 Mon Aug 7 15:49:44 2017
+++ pkgsrc/mk/install/install.mk Tue Aug 8 17:17:25 2017
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.71 2017/08/07 15:49:44 jlam Exp $
+# $NetBSD: install.mk,v 1.72 2017/08/08 17:17:25 jlam Exp $
#
# This file provides the code for the "install" phase.
#
@@ -246,21 +246,25 @@ _INSTALL_ONE_DIR_CMD= { \
# 2. Leading "gnu/" is transformed into "${PKGGNUDIR}".
# 3. Leading "man/" is transformed into "${PKGMANDIR}/".
#
-# ASSERT: Paths listed in ${_INSTALLATION_DIRS} must be relative paths.
+# Check that paths listed in ${_INSTALLATION_DIRS} are relative paths.
+# This can't be an assertion because some variables used when listing
+# directories in INSTALLATION_DIRS are not expanded until they are
+# used.
#
_INSTALLATION_DIRS= ${INSTALLATION_DIRS:C,^${PREFIX}/,,:C,^gnu/,${PKGGNUDIR},:C,^man/,${PKGMANDIR}/,}
-.if !empty(_INSTALLATION_DIRS:M/*)
-PKG_FAIL_REASON+= "INSTALLATION_DIRS items must begin with "${PREFIX:Q}" or be relative paths."
-.endif
.PHONY: install-makedirs
install-makedirs:
${RUN} ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}
.if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS)
@${STEP_MSG} "Creating installation directories"
- ${RUN} \
- for dir in ${_INSTALLATION_DIRS}; do \
- ${_INSTALL_ONE_DIR_CMD}; \
+ ${RUN} set -- args ${_INSTALLATION_DIRS}; shift; \
+ while ${TEST} "$$#" -gt 0; do \
+ dir="$$1"; shift; \
+ case "$$dir" in \
+ /*) ${FAIL_MSG} "INSTALLATION_DIRS: $$dir must be in "${PREFIX:Q}"." ;; \
+ *) ${_INSTALL_ONE_DIR_CMD} ;; \
+ esac; \
done
.endif # INSTALLATION_DIRS
Home |
Main Index |
Thread Index |
Old Index