summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2002-02-28 11:08:55 +0000
committeragc <agc@pkgsrc.org>2002-02-28 11:08:55 +0000
commit828c0da9d98dfe3f9d3dffbbb5fdbf8208ca08ea (patch)
treef345e40f62059d1225138a9f19dce9be4bfff01c
parentb8d1c715f69aa5150b1beef58298feaacf7a7f31 (diff)
downloadpkgsrc-828c0da9d98dfe3f9d3dffbbb5fdbf8208ca08ea.tar.gz
When constructing the build version information, avoid problems
when there is a filename with an embedded space in the directory. Fixes PR 15755 from Simon Burge (simonb@wasabisystems.com). Whilst I'm here, only include the build information for the package Makefile once.
-rw-r--r--mk/bsd.pkg.mk22
1 files changed, 13 insertions, 9 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 27db330a45f..55cf0cfed05 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.931 2002/02/25 12:06:48 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.932 2002/02/28 11:08:55 agc Exp $
#
# This file is in the public domain.
#
@@ -3475,13 +3475,14 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
. endif
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${BUILD_VERSION_FILE} ${BUILD_INFO_FILE}
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${SIZE_PKG_FILE} ${SIZE_ALL_FILE}
- ${_PKG_SILENT}${_PKG_DEBUG}\
- files=""; \
- for f in ${.CURDIR}/Makefile ${FILESDIR}/* ${PKGDIR}/*; do \
- if [ -f $$f ]; then \
- files="$$files $$f"; \
- fi; \
- done; \
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ if [ -d ${FILESDIR} ]; then \
+ files='${FILESDIR}/*'; \
+ else \
+ files=""; \
+ fi; \
+ ${GREP} '\$$NetBSD' $$files ${PKGDIR}/* | ${SED} -e 's|^${_PKGSRCDIR}/||' > ${BUILD_VERSION_FILE}; \
+ files=""; \
if [ -f ${DISTINFO_FILE} ]; then \
for f in `${AWK} 'NF == 4 && $$3 == "=" { gsub("[()]", "", $$2); print $$2 }' < ${DISTINFO_FILE}`; do \
if [ -f ${PATCHDIR}/$$f ]; then \
@@ -3498,7 +3499,10 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
esac; \
done; \
fi; \
- ${GREP} '\$$NetBSD' $$files | ${SED} -e 's|^${_PKGSRCDIR}/||' > ${BUILD_VERSION_FILE};
+ case "$$files" in \
+ "") ;; \
+ *) ${GREP} '\$$NetBSD' $$files | ${SED} -e 's|^${_PKGSRCDIR}/||' >> ${BUILD_VERSION_FILE};; \
+ esac
. for def in ${BUILD_DEFS}
@${ECHO} ${def}= ${${def}:Q} | ${SED} -e 's|^PATH=[^ ]*|PATH=...|' >> ${BUILD_INFO_FILE}
. endfor