summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-14 21:04:43 +0000
committerjlam <jlam@pkgsrc.org>2001-11-14 21:04:43 +0000
commit770f9cd495f06a41ff5908b0529fdcc9a2aa270f (patch)
tree118eec4013799f7f987ede296ca1d5e3d5ec8d48
parentd29edaffe817de2f0f86f0bcd5051de00cf7c298 (diff)
downloadpkgsrc-770f9cd495f06a41ff5908b0529fdcc9a2aa270f.tar.gz
Allow MESSAGE_SRC to be a space-separated list of files, like PLIST_SRC,
that are concatenated together to form the whole MESSAGE file.
-rw-r--r--mk/bsd.pkg.mk14
1 files changed, 9 insertions, 5 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index ad42cb5e321..4d0166ca77a 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.847 2001/11/14 12:38:51 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.848 2001/11/14 21:04:43 jlam Exp $
#
# This file is in the public domain.
#
@@ -581,8 +581,9 @@ DEINSTALL_FILE= ${PKGDIR}/DEINSTALL
DEINSTALL_FILE= ${.CURDIR}/DEINSTALL
.endif
-# Set MESSAGE_SRC to be the name of any MESSAGE file, if ${MESSAGE}
-# hasn't be defined
+# If MESSAGE hasn't been defined, then set MESSAGE_SRC to be a space-separated
+# list of files to be concatenated together to generate the MESSAGE file.
+#
.if !defined(MESSAGE_SRC) && !defined(MESSAGE) && exists(${PKGDIR}/MESSAGE)
MESSAGE_SRC= ${PKGDIR}/MESSAGE
.elif !defined(MESSAGE_SRC) && !defined(MESSAGE) && exists(${.CURDIR}/MESSAGE)
@@ -598,6 +599,8 @@ MESSAGE_SUBST+= PKGNAME=${PKGNAME} \
LOCALBASE=${LOCALBASE} \
X11PREFIX=${X11PREFIX} \
X11BASE=${X11BASE}
+
+MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}
.endif
PKG_ADD?= PKG_DBDIR=${PKG_DBDIR} ${PKG_TOOLS_BIN}/pkg_add
@@ -3452,8 +3455,9 @@ ${MESSAGE}: ${MESSAGE_SRC}
${ECHO} "${MESSAGE_SRC} not found."; \
${ECHO} "Please set MESSAGE_SRC correctly."; \
else \
- ${SED} ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}\
- ${MESSAGE_SRC} > ${MESSAGE}; \
+ ${CAT} ${MESSAGE_SRC} | \
+ ${SED} ${MESSAGE_SUBST_SED} \
+ > ${MESSAGE}; \
fi
.endif