summaryrefslogtreecommitdiff
path: root/mk/misc
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2007-07-21 22:31:02 +0000
committergdt <gdt@pkgsrc.org>2007-07-21 22:31:02 +0000
commit13a15e526378171569a76ad02cad2adaa200c35f (patch)
tree24e811f7733fdc93afaf813434b8abf77c54127a /mk/misc
parentca6ac8d4ac6e12bec8efa02790dbea300caa6d05 (diff)
downloadpkgsrc-13a15e526378171569a76ad02cad2adaa200c35f.tar.gz
In cce, run cvs edit if the file is not writable. This occurs with
CVSREAD=t, and should result in unchanged behavior with writable files. Split _CCE_CHANGES definition into _CCE_CHANGES_{DIR/BASE} to facilitate above.
Diffstat (limited to 'mk/misc')
-rw-r--r--mk/misc/developer.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/mk/misc/developer.mk b/mk/misc/developer.mk
index 0b113c0676a..c58e79cd878 100644
--- a/mk/misc/developer.mk
+++ b/mk/misc/developer.mk
@@ -1,4 +1,4 @@
-# $NetBSD: developer.mk,v 1.6 2007/04/01 21:14:27 wiz Exp $
+# $NetBSD: developer.mk,v 1.7 2007/07/21 22:31:02 gdt Exp $
#
# Public targets for developers:
#
@@ -64,7 +64,9 @@ _CE_ERRORS+= "[developer.mk] Invalid value "${CTYPE:Q}" for CTYPE."
_CE_MSG2= [${NETBSD_LOGIN_NAME} ${_CDATE_cmd:sh}]
_CE_MSG= ${_CE_MSG1} ${_CE_MSG2}
-_CCE_CHANGES= ${PKGSRCDIR}/doc/CHANGES-${_CYEAR_cmd:sh}
+_CCE_CHANGES_DIR= ${PKGSRCDIR}/doc/
+_CCE_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh}
+_CCE_CHANGES= ${_CCE_CHANGES_DIR}/${_CCE_CHANGES_BASE}
.PHONY: changes-entry
changes-entry: ce-error-check
@@ -72,11 +74,12 @@ changes-entry: ce-error-check
commit-changes-entry cce: .PHONY ce-error-check
@${STEP_MSG} "Updating ${PKGSRC_CHANGES:T}"
- ${RUN} cd ${PKGSRCDIR}/doc && cvs update ${_CCE_CHANGES:T}
+ ${RUN} cd ${_CCE_CHANGES_DIR} && cvs update ${_CCE_CHANGES:T}
+ ${RUN} cd ${_CCE_CHANGES_DIR} && test -w ${_CCE_CHANGES:T} || cvs edit ${_CCE_CHANGES:T}
@${STEP_MSG} "Adding the change"
${RUN} ${ECHO} " "${_CE_MSG:Q} >> ${_CCE_CHANGES}
@${STEP_MSG} "Committing the change"
- ${RUN} cd ${PKGSRCDIR}/doc && cvs commit -m ${_CE_MSG1:Q} ${_CCE_CHANGES:T}
+ ${RUN} cd ${_CCE_CHANGES_DIR} && cvs commit -m ${_CE_MSG1:Q} ${_CCE_CHANGES:T}
ce-error-check:
.if defined(_CE_ERRORS) && !empty(_CE_ERRORS:M*)