diff options
author | jlam <jlam@pkgsrc.org> | 2005-06-09 16:26:23 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-06-09 16:26:23 +0000 |
commit | 066425d90aa395ff875654e1884e3ce0c8c866c9 (patch) | |
tree | d3d542b00cf9cc82a057bbc511c555143c817255 /mk | |
parent | a73b5530d12f53e1d4f8d76429b79284e8e56552 (diff) | |
download | pkgsrc-066425d90aa395ff875654e1884e3ce0c8c866c9.tar.gz |
General improvements to the changes-entry target:
* Improve the documentation.
* Avoid running commands during Makefile processing by using the :sh
modifier instead of defining variables using !=
* Add a new variable PKGSRC_CHANGES that holds the path to the CHANGES
file to be modified.
* Use ${ID} and ${DATE}, which are provided by the tools framework and
avoid PATH issues.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index e866d45ff72..aafbcc93290 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1691 2005/06/09 16:09:58 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1692 2005/06/09 16:26:23 jlam Exp $ # # This file is in the public domain. # @@ -4845,7 +4845,8 @@ show-tools: . endif .endfor -# changes-entry appends an entry to pkgsrc/doc/CHANGES. +# changes-entry appends a correctly-formatted entry to the pkgsrc +# CHANGES file. # # The following variables may be set: # @@ -4855,12 +4856,22 @@ show-tools: # NETBSD_LOGIN_NAME is the login name assigned by the NetBSD Project. # It defaults to the local login name. # +# PKGSRC_CHANGES is the path to the CHANGES file to which the entry +# is appended. It defaults to ${PKGSRCDIR}/doc/CHANGES. +# # Example usage: # -# cd /usr/pkgsrc/category/package -# make changes-entry CTYPE=Added +# % cd /usr/pkgsrc/category/package +# % make changes-entry CTYPE=Added # -CTYPE?= Updated +CTYPE?= Updated +NETBSD_LOGIN_NAME?= ${_NETBSD_LOGIN_NAME_cmd:sh} +PKGSRC_CHANGES?= ${PKGSRCDIR}/doc/CHANGES + +_CDATE_cmd= ${DATE} -u +%Y-%m-%d +_NETBSD_LOGIN_NAME_cmd= ${ID} -nu + +_CTYPE1= " "${CTYPE:Q}" "${PKGPATH:Q} .if !empty(CTYPE:MUpdated) _CTYPE2= " to "${PKGVERSION:Q} .elif !empty(CTYPE:MAdded) @@ -4870,10 +4881,9 @@ _CTYPE2= " to XXX" .else _CTYPE2= .endif -# override in /etc/mk.conf with your NetBSD login if different -NETBSD_LOGIN_NAME?= `id -nu` -CDATE!= date -u +%Y-%m-%d +_CTYPE3= " ["${NETBSD_LOGIN_NAME:Q}" "${_CDATE_cmd:sh:Q}"]" + .PHONY: changes-entry changes-entry: - @${ECHO} " "${CTYPE:Q}" "${PKGPATH:Q}${_CTYPE2}" [${NETBSD_LOGIN_NAME} "${CDATE:Q}"]"\ - >> ${_PKGSRCDIR}/doc/CHANGES + ${_PKG_SILENT}${_PKG_DEBUG} \ + ${ECHO} ${_CTYPE1}${_CTYPE2}${_CTYPE3} >> ${PKGSRC_CHANGES:Q} |