| @@ -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 | |
42 | CTYPE?= Updated | | 42 | CTYPE?= Updated |
43 | NETBSD_LOGIN_NAME?= ${_NETBSD_LOGIN_NAME_cmd:sh} | | 43 | NETBSD_LOGIN_NAME?= ${_NETBSD_LOGIN_NAME_cmd:sh} |
44 | | | 44 | |
45 | PKGSRC_CHANGES_DIR= ${PKGSRCDIR}/doc/ | | 45 | PKGSRC_CHANGES_DIR= ${PKGSRCDIR}/doc/ |
46 | PKGSRC_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh} | | 46 | PKGSRC_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh} |
47 | PKGSRC_CHANGES?= ${PKGSRC_CHANGES_DIR}/${PKGSRC_CHANGES_BASE} | | 47 | PKGSRC_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}] |