Wed Apr 30 16:22:18 2008 UTC ()
Relax the values that CTYPE can take for changes-entry and related
targets.  Values are now case-insensitive, and the expanded set of values
that can be used are:

	Added			=> add*
	Updated			=> up*
	Removed			=> rem*, rm
	Renamed, Moved		=> ren*, mov*, mv

This changes is purely for usability reasons -- I have trouble remembering
the exact values, and I don't like to type with capitalization unless.


(jlam)
diff -r1.11 -r1.12 pkgsrc/mk/misc/developer.mk

cvs diff -r1.11 -r1.12 pkgsrc/mk/misc/developer.mk (expand / switch to unified diff)

--- pkgsrc/mk/misc/developer.mk 2007/11/29 23:35:37 1.11
+++ pkgsrc/mk/misc/developer.mk 2008/04/30 16:22:18 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: developer.mk,v 1.11 2007/11/29 23:35:37 gdt Exp $ 1# $NetBSD: developer.mk,v 1.12 2008/04/30 16:22:18 jlam Exp $
2# 2#
3# Public targets for developers: 3# Public targets for developers:
4# 4#
5# changes-entry-noupdate: 5# changes-entry-noupdate:
6# Appends a correctly-formatted entry to the pkgsrc CHANGES file. 6# Appends a correctly-formatted entry to the pkgsrc CHANGES file.
7# The CHANGES file is presumed to be up to date and writable. 7# The CHANGES file is presumed to be up to date and writable.
8# Note that the first assumption is often wrong and that the 8# Note that the first assumption is often wrong and that the
9# second is wrong for those that set CVSREAD. 9# second is wrong for those that set CVSREAD.
10# 10#
11# Command-line variables: 11# Command-line variables:
12# 12#
13# CTYPE 13# CTYPE
14# The type of entry to add. Must be one of "Added", 14# The type of entry to add. Must be one of "Added",
@@ -40,34 +40,34 @@ @@ -40,34 +40,34 @@
40# Like changes-entry, plus the CHANGES file is committed. 40# Like changes-entry, plus the CHANGES file is committed.
41 41
42CTYPE?= Updated 42CTYPE?= Updated
43NETBSD_LOGIN_NAME?= ${_NETBSD_LOGIN_NAME_cmd:sh} 43NETBSD_LOGIN_NAME?= ${_NETBSD_LOGIN_NAME_cmd:sh}
44 44
45PKGSRC_CHANGES_DIR= ${PKGSRCDIR}/doc/ 45PKGSRC_CHANGES_DIR= ${PKGSRCDIR}/doc/
46PKGSRC_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh} 46PKGSRC_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh}
47PKGSRC_CHANGES?= ${PKGSRC_CHANGES_DIR}/${PKGSRC_CHANGES_BASE} 47PKGSRC_CHANGES?= ${PKGSRC_CHANGES_DIR}/${PKGSRC_CHANGES_BASE}
48 48
49_CYEAR_cmd= ${DATE} -u +%Y 49_CYEAR_cmd= ${DATE} -u +%Y
50_CDATE_cmd= ${DATE} -u +%Y-%m-%d 50_CDATE_cmd= ${DATE} -u +%Y-%m-%d
51_NETBSD_LOGIN_NAME_cmd= ${ID} -nu 51_NETBSD_LOGIN_NAME_cmd= ${ID} -nu
52 52
53.if ${CTYPE} == "Updated" 53.if !empty(CTYPE:tl:Mup*) # updated
54_CE_MSG1= Updated ${PKGPATH} to ${PKGVERSION} 54_CE_MSG1= Updated ${PKGPATH} to ${PKGVERSION}
55.elif ${CTYPE} == "Removed" 55.elif !empty(CTYPE:tl:Mrem*) || !empty(CTYPE:tl:Mrm) # removed
56# XXX Check OLDNAME, and if so add " successor ${OLDNAME}". 56# XXX Check OLDNAME, and if so add " successor ${OLDNAME}".
57_CE_MSG1= Removed ${PKGPATH} 57_CE_MSG1= Removed ${PKGPATH}
58.elif ${CTYPE} == "Added" 58.elif !empty(CTYPE:tl:Madd*) # added
59_CE_MSG1= Added ${PKGPATH} version ${PKGVERSION} 59_CE_MSG1= Added ${PKGPATH} version ${PKGVERSION}
60.elif ${CTYPE} == "Renamed" || ${CTYPE} == "Moved" 60.elif !empty(CTYPE:tl:Mren*) || !empty(CTYPE:tl:Mmov*) || !empty(CTYPE:tl:Mmv)
61. if defined(TO) 61. if defined(TO)
62. if exists(${PKGSRCDIR}/${TO}) 62. if exists(${PKGSRCDIR}/${TO})
63_CE_MSG1= ${CTYPE} ${PKGPATH} to ${TO} 63_CE_MSG1= ${CTYPE} ${PKGPATH} to ${TO}
64. else 64. else
65_CE_ERRORS+= "[developer.mk] The package ${TO} does not exist." 65_CE_ERRORS+= "[developer.mk] The package ${TO} does not exist."
66. endif 66. endif
67. else 67. else
68_CE_ERRORS+= "[developer.mk] The TO variable must be set." 68_CE_ERRORS+= "[developer.mk] The TO variable must be set."
69. endif 69. endif
70.else 70.else
71_CE_ERRORS+= "[developer.mk] Invalid value "${CTYPE:Q}" for CTYPE." 71_CE_ERRORS+= "[developer.mk] Invalid value "${CTYPE:Q}" for CTYPE."
72.endif 72.endif
73_CE_MSG2= [${NETBSD_LOGIN_NAME} ${_CDATE_cmd:sh}] 73_CE_MSG2= [${NETBSD_LOGIN_NAME} ${_CDATE_cmd:sh}]