head 1.26; access; symbols pkgsrc-2023Q4:1.26.0.14 pkgsrc-2023Q4-base:1.26 pkgsrc-2023Q3:1.26.0.12 pkgsrc-2023Q3-base:1.26 pkgsrc-2023Q2:1.26.0.10 pkgsrc-2023Q2-base:1.26 pkgsrc-2023Q1:1.26.0.8 pkgsrc-2023Q1-base:1.26 pkgsrc-2022Q4:1.26.0.6 pkgsrc-2022Q4-base:1.26 pkgsrc-2022Q3:1.26.0.4 pkgsrc-2022Q3-base:1.26 pkgsrc-2022Q2:1.26.0.2 pkgsrc-2022Q2-base:1.26 pkgsrc-2022Q1:1.25.0.10 pkgsrc-2022Q1-base:1.25 pkgsrc-2021Q4:1.25.0.8 pkgsrc-2021Q4-base:1.25 pkgsrc-2021Q3:1.25.0.6 pkgsrc-2021Q3-base:1.25 pkgsrc-2021Q2:1.25.0.4 pkgsrc-2021Q2-base:1.25 pkgsrc-2021Q1:1.25.0.2 pkgsrc-2021Q1-base:1.25 pkgsrc-2020Q4:1.24.0.28 pkgsrc-2020Q4-base:1.24 pkgsrc-2020Q3:1.24.0.26 pkgsrc-2020Q3-base:1.24 pkgsrc-2020Q2:1.24.0.22 pkgsrc-2020Q2-base:1.24 pkgsrc-2020Q1:1.24.0.2 pkgsrc-2020Q1-base:1.24 pkgsrc-2019Q4:1.24.0.24 pkgsrc-2019Q4-base:1.24 pkgsrc-2019Q3:1.24.0.20 pkgsrc-2019Q3-base:1.24 pkgsrc-2019Q2:1.24.0.18 pkgsrc-2019Q2-base:1.24 pkgsrc-2019Q1:1.24.0.16 pkgsrc-2019Q1-base:1.24 pkgsrc-2018Q4:1.24.0.14 pkgsrc-2018Q4-base:1.24 pkgsrc-2018Q3:1.24.0.12 pkgsrc-2018Q3-base:1.24 pkgsrc-2018Q2:1.24.0.10 pkgsrc-2018Q2-base:1.24 pkgsrc-2018Q1:1.24.0.8 pkgsrc-2018Q1-base:1.24 pkgsrc-2017Q4:1.24.0.6 pkgsrc-2017Q4-base:1.24 pkgsrc-2017Q3:1.24.0.4 pkgsrc-2017Q3-base:1.24 pkgsrc-2017Q2:1.22.0.28 pkgsrc-2017Q2-base:1.22 pkgsrc-2017Q1:1.22.0.26 pkgsrc-2017Q1-base:1.22 pkgsrc-2016Q4:1.22.0.24 pkgsrc-2016Q4-base:1.22 pkgsrc-2016Q3:1.22.0.22 pkgsrc-2016Q3-base:1.22 pkgsrc-2016Q2:1.22.0.20 pkgsrc-2016Q2-base:1.22 pkgsrc-2016Q1:1.22.0.18 pkgsrc-2016Q1-base:1.22 pkgsrc-2015Q4:1.22.0.16 pkgsrc-2015Q4-base:1.22 pkgsrc-2015Q3:1.22.0.14 pkgsrc-2015Q3-base:1.22 pkgsrc-2015Q2:1.22.0.12 pkgsrc-2015Q2-base:1.22 pkgsrc-2015Q1:1.22.0.10 pkgsrc-2015Q1-base:1.22 pkgsrc-2014Q4:1.22.0.8 pkgsrc-2014Q4-base:1.22 pkgsrc-2014Q3:1.22.0.6 pkgsrc-2014Q3-base:1.22 pkgsrc-2014Q2:1.22.0.4 pkgsrc-2014Q2-base:1.22 pkgsrc-2014Q1:1.22.0.2 pkgsrc-2014Q1-base:1.22 pkgsrc-2013Q4:1.20.0.6 pkgsrc-2013Q4-base:1.20 pkgsrc-2013Q3:1.20.0.4 pkgsrc-2013Q3-base:1.20 pkgsrc-2013Q2:1.20.0.2 pkgsrc-2013Q2-base:1.20 pkgsrc-2013Q1:1.19.0.14 pkgsrc-2013Q1-base:1.19 pkgsrc-2012Q4:1.19.0.12 pkgsrc-2012Q4-base:1.19 pkgsrc-2012Q3:1.19.0.10 pkgsrc-2012Q3-base:1.19 pkgsrc-2012Q2:1.19.0.8 pkgsrc-2012Q2-base:1.19 pkgsrc-2012Q1:1.19.0.6 pkgsrc-2012Q1-base:1.19 pkgsrc-2011Q4:1.19.0.4 pkgsrc-2011Q4-base:1.19 pkgsrc-2011Q3:1.19.0.2 pkgsrc-2011Q3-base:1.19 pkgsrc-2011Q2:1.18.0.16 pkgsrc-2011Q2-base:1.18 pkgsrc-2011Q1:1.18.0.14 pkgsrc-2011Q1-base:1.18 pkgsrc-2010Q4:1.18.0.12 pkgsrc-2010Q4-base:1.18 pkgsrc-2010Q3:1.18.0.10 pkgsrc-2010Q3-base:1.18 pkgsrc-2010Q2:1.18.0.8 pkgsrc-2010Q2-base:1.18 pkgsrc-2010Q1:1.18.0.6 pkgsrc-2010Q1-base:1.18 pkgsrc-2009Q4:1.18.0.4 pkgsrc-2009Q4-base:1.18 pkgsrc-2009Q3:1.18.0.2 pkgsrc-2009Q3-base:1.18 pkgsrc-2009Q2:1.15.0.6 pkgsrc-2009Q2-base:1.15 pkgsrc-2009Q1:1.15.0.4 pkgsrc-2009Q1-base:1.15 pkgsrc-2008Q4:1.15.0.2 pkgsrc-2008Q4-base:1.15 pkgsrc-2008Q3:1.12.0.8 pkgsrc-2008Q3-base:1.12 cube-native-xorg:1.12.0.6 cube-native-xorg-base:1.12 pkgsrc-2008Q2:1.12.0.4 pkgsrc-2008Q2-base:1.12 cwrapper:1.12.0.2 pkgsrc-2008Q1:1.11.0.4 pkgsrc-2008Q1-base:1.11 pkgsrc-2007Q4:1.11.0.2 pkgsrc-2007Q4-base:1.11 pkgsrc-2007Q3:1.10.0.2 pkgsrc-2007Q3-base:1.10 pkgsrc-2007Q2:1.6.0.4 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.2 pkgsrc-2007Q1-base:1.6 jlam-pkgviews:1.5.0.2 jlam-pkgviews-base:1.5; locks; strict; comment @# @; 1.26 date 2022.06.16.04.56.49; author rillig; state Exp; branches; next 1.25; commitid rpHRDShuaqpPMdID; 1.25 date 2021.01.20.01.35.33; author gutteridge; state Exp; branches; next 1.24; commitid MSIhWXiQ26h69pEC; 1.24 date 2017.09.13.09.06.34; author wiz; state Exp; branches; next 1.23; commitid 59NyAE5cA0GY017A; 1.23 date 2017.09.12.14.04.59; author wiz; state Exp; branches; next 1.22; commitid byuwwHxXygQpHU6A; 1.22 date 2014.02.22.13.11.22; author obache; state Exp; branches; next 1.21; commitid olKWSDdCakHQ76qx; 1.21 date 2014.02.20.10.12.22; author obache; state Exp; branches; next 1.20; commitid 77LP2beQIabYbPpx; 1.20 date 2013.04.12.13.53.57; author joerg; state Exp; branches; next 1.19; 1.19 date 2011.09.15.21.45.52; author wiz; state Exp; branches; next 1.18; 1.18 date 2009.08.23.18.09.45; author joerg; state Exp; branches; next 1.17; 1.17 date 2009.08.21.23.34.42; author wiz; state Exp; branches; next 1.16; 1.16 date 2009.08.21.12.51.07; author wiz; state Exp; branches; next 1.15; 1.15 date 2008.11.05.08.21.56; author rillig; state Exp; branches; next 1.14; 1.14 date 2008.10.20.10.19.18; author rillig; state Exp; branches; next 1.13; 1.13 date 2008.10.20.10.17.40; author rillig; state Exp; branches; next 1.12; 1.12 date 2008.04.30.16.22.18; author jlam; state Exp; branches; next 1.11; 1.11 date 2007.11.29.23.35.37; author gdt; state Exp; branches; next 1.10; 1.10 date 2007.09.09.22.57.04; author gdt; state Exp; branches; next 1.9; 1.9 date 2007.08.02.11.52.14; author gdt; state Exp; branches; next 1.8; 1.8 date 2007.07.28.12.23.17; author gdt; state Exp; branches; next 1.7; 1.7 date 2007.07.21.22.31.02; author gdt; state Exp; branches; next 1.6; 1.6 date 2007.04.01.21.14.27; author wiz; state Exp; branches; next 1.5; 1.5 date 2007.03.14.17.53.03; author rillig; state Exp; branches; next 1.4; 1.4 date 2007.03.14.16.21.58; author rillig; state Exp; branches; next 1.3; 1.3 date 2007.03.08.23.38.43; author rillig; state Exp; branches; next 1.2; 1.2 date 2007.02.06.20.06.38; author rillig; state Exp; branches; next 1.1; 1.1 date 2007.01.02.21.29.07; author rillig; state Exp; branches; next ; desc @@ 1.26 log @mk/developer.mk: reorganize documentation for 'make cce' In most cases, the command 'make cce' is all that is needed to add a changes entry, so put it at the top of the documentation. The smaller steps are useful when updating multiple packages at once, which is less often the case. Make the possible values for CTYPE stand out, instead of hiding them in the body text. @ text @# $NetBSD: developer.mk,v 1.25 2021/01/20 01:35:33 gutteridge Exp $ # # Targets for pkgsrc developers for updating doc/CHANGES, doc/TODO, and for # uploading distfiles to NetBSD's backup location. # # cce: # commit-changes-entry: # Updates the CHANGES and TODO files from CVS, appends an entry to the # CHANGES file, removes any TODO entries that were completed with this # update, and finally commits the changes to CVS. # # CTYPE # The type of entry to add: # # Added for a new package # Updated (default) # Renamed when the PKGNAME has changed # Moved when the package has a new directory, but the # PKGNAME is still the same # Removed for a removed package # # TO When a package is renamed, this is the new name of the # package. # # NETBSD_LOGIN_NAME # The login name assigned by the NetBSD Project. # The default is the local login name. # # PKGSRC_CHANGES # The path to the CHANGES file to which the entry is appended. # The default is ${PKGSRCDIR}/doc/CHANGES-YYYY. # # PKGSRC_TODO # The path to the TODO file from which now possibly obsolete # entries are removed. # The default is ${PKGSRCDIR}/TODO. # # USE_NETBSD_REPO # Explicitly use cvs.netbsd.org:/cvsroot for all cvs commands # issued by changes-entry and co. # # Example usage: # % cd /usr/pkgsrc/category/package # % make cce CTYPE=Added # # changes-entry: # Like commit-changes-entry, except for actually committing the changes. # # changes-entry-noupdate: # Like changes-entry, except that the CHANGES and TODO files are not # updated from CVS. Typically used to add several change entries in a # single batch. # # The CHANGES and TODO files are presumed to be up to date and writable. # Note that the first assumption is often wrong and that the second is # wrong for those that set CVSREAD. # # # upload-distfiles: # Upload distribution files to a project archive so that others may fetch # them from there. It only uploads distfiles that are freely # re-distributable by setting NO_SKIP (see mk/fetch/bsd.fetch-vars.mk). # # Keywords: commit update changes todo upload # Keywords: add added update updated rename renamed move moved remove removed # CTYPE?= Updated NETBSD_LOGIN_NAME?= ${_NETBSD_LOGIN_NAME_cmd:sh} PKGSRC_CHANGES_DIR= ${PKGSRCDIR}/doc/ PKGSRC_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh} PKGSRC_CHANGES?= ${PKGSRC_CHANGES_DIR}/${PKGSRC_CHANGES_BASE} PKGSRC_TODO?= ${PKGSRC_CHANGES_DIR}/TODO _CYEAR_cmd= ${DATE} -u +%Y _CDATE_cmd= ${DATE} -u +%Y-%m-%d _NETBSD_LOGIN_NAME_cmd= ${ID} -nu USE_NETBSD_REPO?= no .if !empty(USE_NETBSD_REPO:M[Yy][Ee][Ss]) _NB_CVSROOT= -d ${NETBSD_LOGIN_NAME:Q}@@cvs.NetBSD.org:/cvsroot .endif .if !empty(CTYPE:tl:Mup*) # updated _CE_MSG1= Updated ${PKGPATH} to ${PKGVERSION} .elif !empty(CTYPE:tl:Mrem*) || !empty(CTYPE:tl:Mrm) # removed # XXX Check OLDNAME, and if so add " successor ${OLDNAME}". _CE_MSG1= Removed ${PKGPATH} .elif !empty(CTYPE:tl:Madd*) # added _CE_MSG1= Added ${PKGPATH} version ${PKGVERSION} .elif !empty(CTYPE:tl:Mren*) || !empty(CTYPE:tl:Mmov*) || !empty(CTYPE:tl:Mmv) . if !defined(TO) _CE_ERRORS+= "[developer.mk] The TO variable must be set." . elif !exists(${PKGSRCDIR}/${TO}) _CE_ERRORS+= "[developer.mk] The package directory ${TO} does not exist." . endif . if !empty(CTYPE:M[Mm]*) _CE_MSG1= Moved ${PKGPATH} to ${TO} . else _CE_MSG1= Renamed ${PKGPATH} to ${TO} . endif .else _CE_ERRORS+= "[developer.mk] Invalid value "${CTYPE:Q}" for CTYPE." .endif _CE_MSG2= [${NETBSD_LOGIN_NAME} ${_CDATE_cmd:sh}] _CE_MSG= ${_CE_MSG1} ${_CE_MSG2} # XXX Accumulate commit message during each operation, so that a final # commit operation will have a sensible message with all of the # previous operations. # XXX Fail if uid is 0, or perhaps != CVS meta files owner, to catch # the case of invoking these targets as root. # Targets for the update, add, commit elementary operations. changes-entry-update: .PHONY ce-error-check @@${STEP_MSG} "Updating ${PKGSRC_CHANGES:T} and ${PKGSRC_TODO:T}" ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} update ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_CHANGES:T} || cvs ${_NB_CVSROOT} edit ${PKGSRC_CHANGES:T} ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_TODO:T} || cvs ${_NB_CVSROOT} edit ${PKGSRC_TODO:T} changes-entry-add: .PHONY ce-error-check @@${STEP_MSG} "Adding the change" ${RUN} ${ECHO} " "${_CE_MSG:Q} >> ${PKGSRC_CHANGES} todo-entry-remove: ${RUN} PKG_ADMIN=${PKG_ADMIN_CMD:Q} ${SH} ${PKGSRCDIR}/mk/scripts/remove_todo ${PKGSRC_TODO} ${PKGBASE} ${PKGVERSION} changes-entry-commit: .PHONY ce-error-check @@${STEP_MSG} "Committing the change" ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} commit -m "doc: "${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} ce-error-check: .PHONY .if defined(_CE_ERRORS) && !empty(_CE_ERRORS:M*) ${RUN} for msg in ${_CE_ERRORS}; do ${ERROR_MSG} "$$msg"; done; exit 1 .else @@${DO_NADA} .endif # Public targets changes-entry-noupdate: .PHONY ce-error-check changes-entry-add todo-entry-remove @@${DO_NADA} changes-entry: .PHONY ce-error-check changes-entry-update changes-entry-add todo-entry-remove @@${DO_NADA} commit-changes-entry cce: .PHONY ce-error-check changes-entry-update changes-entry-add todo-entry-remove changes-entry-commit @@${DO_NADA} .PHONY: upload-distfiles .if defined(NO_SRC_ON_FTP) || empty(_ALLFILES) upload-distfiles: @@${DO_NADA} .else . if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS) upload-distfiles: . for _platform_ in ${EMUL_PLATFORMS} ${RUN} ${MAKE} ${MAKEFLAGS} do-upload-distfiles NO_SKIP=yes \ _BOOTSTRAP_VERBOSE= EMUL_PLATFORM=${_platform_} . endfor . else upload-distfiles: do-upload-distfiles . endif .PHONY: do-upload-distfiles do-upload-distfiles: checksum ${RUN} \ disthost='ftp.NetBSD.org'; \ distdir='~ftp/pub/pkgsrc/distfiles'; \ ssh_cmd="ssh -l ${NETBSD_LOGIN_NAME} $${disthost}"; \ ${STEP_MSG} "Checking uploaded files"; \ uploaded_files=`${ECHO} "(cd $${distdir} && /bin/ls -1d ${_ALLFILES}) 2>/dev/null || ${TRUE}" | $${ssh_cmd} /bin/sh`; \ pending_files=""; \ for file in ${_ALLFILES}; do \ found=0; \ for ufile in "" $${uploaded_files}; do \ if ${TEST} x$${file} = x$${ufile}; then \ found=1; \ break; \ fi; \ done; \ if ${TEST} $${found} -ne 1; then \ pending_files="$${pending_files} $${file}"; \ fi; \ done; \ if ${TEST} -n "$${pending_files}"; then \ ${STEP_MSG} "Uploading distfiles"; \ cd ${DISTDIR} && ${TAR:U${TOOLS_PLATFORM.tar:Utar}} cf - $${pending_files} | \ $${ssh_cmd} /bin/tar xpf - -C "$${distdir}"; \ fi .endif @ 1.25 log @developer.mk: improve a comment @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.24 2017/09/13 09:06:34 wiz Exp $ d3 2 a4 1 # Public targets for developers: d6 5 a10 7 # changes-entry-noupdate: # Appends a correctly-formatted entry to the pkgsrc CHANGES file, # and removes any TODO entries that were completed with this # update from the TODO file. # The CHANGES and TODO files are presumed to be up to date and writable. # Note that the first assumption is often wrong and that the # second is wrong for those that set CVSREAD. d12 2 a13 1 # Command-line variables: d15 6 a20 6 # CTYPE # The type of entry to add. Must be one of "Added", # "Updated", "Renamed" (when the PKGNAME has changed), # "Moved" (when the package has a new directory, but the # PKGNAME is still the same), or "Removed". # The default is "Updated". d22 1 a22 2 # TO # When a package is renamed, this is the new name of the d30 1 a30 2 # The path to the CHANGES file to which the entry # is appended. d34 2 a35 2 # The path to the TODO file from which now possibly # obsolete entries are removed d40 1 a40 1 # issues by changes-entry and co. d44 1 a44 1 # % make changes-entry CTYPE=Added d47 10 a56 2 # Like changes-entry-noupdate, plus the CHANGES and TODO files # are updated, and if not writable, "cvs edit" is done. a57 3 # commit-changes-entry: # cce: # Like changes-entry, plus the CHANGES and TODO files are committed. d64 2 a65 1 # Keywords: commit update add rename changes upload @ 1.24 log @mk/misc/developer.mk: improve commit message Commits to doc/ might also affect the TODO file, so use "doc: " instead of "CHANGES-2017: " as default prefix. Suggested by jperkin. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.23 2017/09/12 14:04:59 wiz Exp $ d57 3 a59 3 # Upload files that wish to provide distfiles that others may fetch. # It only upload distfiles that are freely re-distributable by setting # NO_SKIP (see mk/fetch/bsd.fetch-vars.mk). @ 1.23 log @mk/bsd.pkg.mk: Adapt changes-entry target Prefix package name to commit message. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.22 2014/02/22 13:11:22 obache Exp $ d129 1 a129 1 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} commit -m ${PKGSRC_CHANGES_BASE:Q}": "${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} @ 1.22 log @Use ${NETBSD_LOGIN_NAME} for ssh. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.21 2014/02/20 10:12:22 obache Exp $ d129 1 a129 1 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} commit -m ${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} @ 1.21 log @Add upload-distfiles target for PKG_DEVELOPER, for uploading missing distfiles to our backup ftp server. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.20 2013/04/12 13:53:57 joerg Exp $ d168 1 d170 1 a170 1 uploaded_files=`${ECHO} "(cd $${distdir} && /bin/ls -1d ${_ALLFILES}) 2>/dev/null || ${TRUE}" | ssh $${disthost} /bin/sh`; \ d187 1 a187 1 ssh "$${disthost}" /bin/tar xpf - -C "$${distdir}";\ @ 1.20 log @Allow running on systems where pkg_admin is not in PATH @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.19 2011/09/15 21:45:52 wiz Exp $ d56 6 a61 1 # Keywords: commit update add rename changes d147 43 @ 1.19 log @Update description for cce, from Snader_LB. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.18 2009/08/23 18:09:45 joerg Exp $ d120 1 a120 1 ${RUN} ${SH} ${PKGSRCDIR}/mk/scripts/remove_todo ${PKGSRC_TODO} ${PKGBASE} ${PKGVERSION} @ 1.18 log @Add USE_NETBSD_REPO option to force make cce and friends to use the main repository. Very useful when using a local copy of the repository for normal operation. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.17 2009/08/21 23:34:42 wiz Exp $ d54 1 a54 1 # Like changes-entry, plus the CHANGES file is committed. @ 1.17 log @Make cce depend on todo-entry-remove as well. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.16 2009/08/21 12:51:07 wiz Exp $ d40 4 d71 6 d111 3 a113 3 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs update ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_CHANGES:T} || cvs edit ${PKGSRC_CHANGES:T} ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_TODO:T} || cvs edit ${PKGSRC_TODO:T} d124 1 a124 1 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs commit -m ${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} @ 1.16 log @When making an entry to the CHANGES-* file using 'make changes-entry', the target now automatically also removes any TODO entries for the package that was updated. Script improved based on version by dholland; further suggestions by gdt and joerg. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.15 2008/11/05 08:21:56 rillig Exp $ d130 1 a130 1 commit-changes-entry cce: .PHONY ce-error-check changes-entry-update changes-entry-add changes-entry-commit @ 1.15 log @Clarified the difference between "Renamed" and "Moved". Rewrote a bit of code so that CTYPE=mv and CTYPE=ren work as intended. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.14 2008/10/20 10:19:18 rillig Exp $ d6 4 a9 2 # Appends a correctly-formatted entry to the pkgsrc CHANGES file. # The CHANGES file is presumed to be up to date and writable. d35 5 d45 2 a46 2 # Like changes-entry-noupdate, plus the CHANGES file is updated, # and if not writable, "cvs edit" is done. d61 1 d100 2 a101 2 @@${STEP_MSG} "Updating ${PKGSRC_CHANGES:T}" ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs update ${PKGSRC_CHANGES:T} d103 1 d109 3 d114 1 a114 1 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs commit -m ${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} d124 1 a124 1 changes-entry-noupdate: .PHONY ce-error-check changes-entry-add d127 1 a127 1 changes-entry: .PHONY ce-error-check changes-entry-update changes-entry-add @ 1.14 log @... and added a few more keywords. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.13 2008/10/20 10:17:40 rillig Exp $ d15 3 a17 1 # "Updated", "Renamed", "Moved", or "Removed". d67 7 a73 6 . if defined(TO) . if exists(${PKGSRCDIR}/${TO}) _CE_MSG1= ${CTYPE} ${PKGPATH} to ${TO} . else _CE_ERRORS+= "[developer.mk] The package ${TO} does not exist." . endif d75 1 a75 1 _CE_ERRORS+= "[developer.mk] The TO variable must be set." @ 1.13 log @Reformatted the comments so that "bmake help" recognizes them. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.12 2008/04/30 16:22:18 jlam Exp $ d42 3 @ 1.12 log @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. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.11 2007/11/29 23:35:37 gdt Exp $ d39 2 a40 1 # commit-changes-entry cce: @ 1.11 log @Add comment noting that support for OLDNAME in Removed case is needed. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.10 2007/09/09 22:57:04 gdt Exp $ d53 1 a53 1 .if ${CTYPE} == "Updated" d55 1 a55 1 .elif ${CTYPE} == "Removed" d58 1 a58 1 .elif ${CTYPE} == "Added" d60 1 a60 1 .elif ${CTYPE} == "Renamed" || ${CTYPE} == "Moved" @ 1.10 log @Add notes of things that need fixing: # XXX Accumulate commit message during each operation, so that a final # commit operation will have a sensible message with all of the # previous operations. # XXX Fail if uid is 0, or perhaps != CVS meta files owner, to catch # the case of invoking these targets as root. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.9 2007/08/02 11:52:14 gdt Exp $ d56 1 @ 1.9 log @Add wiz's request, add a changes-entry-noupdate that has the old behavior of just appending to the file without cvs update (or cvs edit if not writable), for the convenience of those committing multiple package updates at once. To implement this, split the update/cat/commit into elementary targets and compose them to form the user-exposed targets, spiff up the comments, and rationalize .PHONY usage. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.8 2007/07/28 12:23:17 gdt Exp $ d75 7 @ 1.8 log @Rationalize changes-entry and commit-changes-entry. changes-entry now does cvs update (and cvs edit if needed), and adds the line. This target will behave the same way (with extra CVS traffic) if the file is up to date, and will be omre useful if CHANGES-YYYY is not up to date. commit-changes-entry depends on changes-entry and also commits. This target has no behavior changes. Rename _CCE_FOO variables to PKGSRC_CHANGES_FOO, and merge with existing varables. We may need a changes-entry-no-update, or a new name for what changes-entry does now. Given how infrequently CHANGES-YYYY is up to date when I want to add, I believe the new behavior will be welcome to almost everyone. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.7 2007/07/21 22:31:02 gdt Exp $ d5 1 a5 1 # changes-entry: d7 3 d35 3 a37 3 # commit-changes-entry: # cce: # Like the above, plus the CHANGES file is committed. d39 2 d75 2 a76 2 .PHONY: changes-entry changes-entry: ce-error-check d80 2 d85 1 a85 1 commit-changes-entry cce: .PHONY ce-error-check changes-entry d89 1 a89 1 ce-error-check: d95 10 @ 1.7 log @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. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.6 2007/04/01 21:14:27 wiz Exp $ d39 4 a42 1 PKGSRC_CHANGES?= ${PKGSRCDIR}/doc/CHANGES-${_CYEAR_cmd:sh} a69 4 _CCE_CHANGES_DIR= ${PKGSRCDIR}/doc/ _CCE_CHANGES_BASE= CHANGES-${_CYEAR_cmd:sh} _CCE_CHANGES= ${_CCE_CHANGES_DIR}/${_CCE_CHANGES_BASE} a71 3 ${RUN} ${ECHO} " "${_CE_MSG:Q} >> ${PKGSRC_CHANGES:Q} commit-changes-entry cce: .PHONY ce-error-check d73 2 a74 2 ${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} d76 3 a78 1 ${RUN} ${ECHO} " "${_CE_MSG:Q} >> ${_CCE_CHANGES} d80 1 a80 1 ${RUN} cd ${_CCE_CHANGES_DIR} && cvs commit -m ${_CE_MSG1:Q} ${_CCE_CHANGES:T} @ 1.6 log @Support "Removed" again. Fix typo in comment. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.5 2007/03/14 17:53:03 rillig Exp $ d67 3 a69 1 _CCE_CHANGES= ${PKGSRCDIR}/doc/CHANGES-${_CYEAR_cmd:sh} d77 2 a78 1 ${RUN} cd ${PKGSRCDIR}/doc && cvs update ${_CCE_CHANGES:T} d82 1 a82 1 ${RUN} cd ${PKGSRCDIR}/doc && cvs commit -m ${_CE_MSG1:Q} ${_CCE_CHANGES:T} @ 1.5 log @Forgot to disable the "echo-only" mode in the last commit. Now "make cce" really commits. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.4 2007/03/14 16:21:58 rillig Exp $ d12 1 a12 1 # "Updated", "Renamed", "Moved", of "Removed". d47 2 @ 1.4 log @Added the target "commit-changes-entry", or "cce", which adds a single package change to the CHANGES file and commits it. Added error checking to the changes-entry target. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.3 2007/03/08 23:38:43 rillig Exp $ d77 1 a77 1 ${RUN} cd ${PKGSRCDIR}/doc && echo cvs commit -m ${_CE_MSG1:Q} ${_CCE_CHANGES:T} @ 1.3 log @Reformatted the documentation. @ text @d1 1 a1 1 # $NetBSD: developer.mk,v 1.2 2007/02/06 20:06:38 rillig Exp $ d15 4 d32 4 d45 14 a58 7 _CTYPE1= " "${CTYPE:Q}" "${PKGPATH:Q} .if !empty(CTYPE:MUpdated) _CTYPE2= " to "${PKGVERSION:Q} .elif !empty(CTYPE:MAdded) _CTYPE2= " version "${PKGVERSION:Q} .elif !empty(CTYPE:MRenamed) || !empty(CTYPE:MMoved) _CTYPE2= " to XXX" d60 1 a60 1 _CTYPE2= d62 4 a65 1 _CTYPE3= " ["${NETBSD_LOGIN_NAME:Q}" "${_CDATE_cmd:sh:Q}"]" d68 17 a84 3 changes-entry: ${RUN} \ ${ECHO} ${_CTYPE1}${_CTYPE2}${_CTYPE3} >> ${PKGSRC_CHANGES:Q} @ 1.2 log @White-space and comment improvements. @ text @d1 1 a1 1 # $NetBSD$ d3 1 a3 3 # changes-entry appends a correctly-formatted entry to the pkgsrc # CHANGES file. d5 2 a6 1 # The following variables may be set: d8 1 a8 2 # CTYPE is the type of entry to add and is one of "Added", "Updated", # "Renamed", "Moved", of "Removed". The default CTYPE is "Updated". d10 4 a13 2 # NETBSD_LOGIN_NAME is the login name assigned by the NetBSD Project. # It defaults to the local login name. d15 3 a17 2 # PKGSRC_CHANGES is the path to the CHANGES file to which the entry # is appended. It defaults to ${PKGSRCDIR}/doc/CHANGES-YYYY. d19 4 a22 1 # Example usage: d24 3 a26 2 # % cd /usr/pkgsrc/category/package # % make changes-entry CTYPE=Added @ 1.1 log @Moved the show-tools target to misc/show.mk. Moved the changes-entry target to misc/developer.mk. To save some time, that file is only included when PKG_DEVELOPER is defined. Moved the build-defs-message target to misc/show.mk and renamed it to show-build-defs, since almost all other *-message targets just print a single line. @ text @d1 3 d23 1 d46 1 a46 1 ${_PKG_SILENT}${_PKG_DEBUG} \ a47 1 @