2 # Avoid "WARNING: Makefile.in seems to ignore the --datarootdir setting":
3 datarootdir
= @datarootdir@
16 # # # # # # # # # # Release variables (for maintainer only):
18 # Files removed from `cvs export' output before creating the tar-ball:
19 CVS_IGNORE_FILES
= .cvsignore contrib
/.cvsignore etc
/.cvsignore \
20 lisp
/.cvsignore texi
/.cvsignore texi
/ps
/.cvsignore .arch-inventory
21 # Name and mail address in ChangeLog format for the release commit:
22 COMMITTER
= Lars Magne Ingebrigtsen
<lars@ingebrigtsen.no
>
23 # CODENAME for development releases (CODENAME must have a trailing space,
26 # Codename initial (lower case), e.g. 'n' for "No Gnus".
28 # Files with hard-coded versions numbers:
29 RELEASE_COMMIT_FILES
= ChangeLog \
30 etc
/ChangeLog lisp
/ChangeLog texi
/ChangeLog \
32 texi
/gnus.texi texi
/message.texi texi
/gnus-faq.texi
33 # Pattern matching previous version numbers:
34 OLD_PATTERN
= \
(5\.
[0-9][0-9]\.
[0-9]*\|
5\.
[0-9][0-9]\|
0\.
[1-9][0-9]*\
)
36 CODENAME_PATTERN
= [A-Z
]*[a-z
]* *
37 # CVS tag of the previous version:
39 # CVS tag of the current release:
42 COMMIT_STRING
= $(CODENAME
)Gnus v
$(VERSION
) is released.
43 # # # # # # # # # # End of release variables
48 cd lisp
&& $(MAKE
) EMACS
="$(EMACS)" lispdir
="$(lispdir)" all
51 cd lisp
&& $(MAKE
) EMACS
="$(EMACS)" lispdir
="$(lispdir)" install
52 cd texi
&& $(MAKE
) EMACS
="$(EMACS)" install
53 cd etc
&& $(MAKE
) EMACS
="$(EMACS)" install
55 list-installed-shadows
:
56 cd lisp
&& $(MAKE
) EMACS
="$(EMACS)" lispdir
="$(lispdir)" list-installed-shadows
58 remove-installed-shadows
:
59 cd lisp
&& $(MAKE
) EMACS
="$(EMACS)" lispdir
="$(lispdir)" remove-installed-shadows
62 cd lisp
&& $(MAKE
) lispdir
="$(lispdir)" uninstall
63 cd texi
&& $(MAKE
) uninstall
64 cd etc
&& $(MAKE
) uninstall
66 GNUS-NEWS
: texi
/gnus-news.texi
67 cd texi
&& $(MAKE
) GNUS-NEWS
69 # Rule for Lars and nobody else.
71 cd lisp
&& $(MAKE
) EMACS
="$(EMACS)" some
73 cd lisp
&& $(MAKE
) EMACS
="$(EMACS)" clever
76 cd texi
&& $(MAKE
) EMACS
="$(EMACS)" all
79 for i in lisp texi etc texi
/ps
; do
(cd
$$i; $(MAKE
) clean); done
83 cd lisp
&& rm -f
*.elc auto-autoloads.el custom-load.el gnus-load.el
86 $(MAKE
) EMACS
=$(XEMACS
)
89 $(MAKE
) EMACS
="$(XEMACS)" some
92 for i in lisp texi etc texi
/ps
; do
(cd
$$i; $(MAKE
) distclean); done
93 rm -f config.log config.status config.cache Makefile
95 config.status
: $(srcdir)/configure
96 $(SHELL
) .
/config.status
--recheck
97 $(srcdir)/configure
: $(srcdir)/configure.in
98 cd
$(srcdir) && autoconf
99 Makefile
: $(srcdir)/Makefile.in config.status
100 CONFIG_FILES
=$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
102 # # # # # # # # # # Release targets (for maintainer only):
104 release-check-settings
:
106 @echo
"COMMITTER = '$(COMMITTER)'"
107 @echo
" (example: 'Foo Bar <foo.bar@somewhere.invalid>')"
108 @echo
"VERSION = '$(VERSION)' (example: '5.10.6')"
109 @echo
"TAG = '$(TAG)' (example: 'v5-10-6')"
110 @echo
"OLD_TAG = '$(OLD_TAG)' (example: 'v5-10-5')"
112 @echo
"# Only for development versions:"
113 @echo
"CODENAME = '$(CODENAME)' (example: 'No ')"
114 @echo
"CIN = '$(CIN)' (example: 'n', codename initial)"
116 @if
[ x
"$(VERSION)" = x
]; then echo
"error: No VERSION given."; exit
1; else :; fi
117 @if
[ x
"$(TAG)" = x
]; then echo
"error: No TAG given."; exit
1; else :; fi
119 @echo Settings checked successfully.
121 @echo You may now make...
122 @echo release-bump-version
123 @echo release-add-changelog
125 @echo release-files or release-files-signed
128 @echo
"Available targets for releases:"
130 @echo
"[0] release-help"
131 @echo
" Display this help message."
133 @echo
"[1] release-check-settings"
134 @echo
" Check it all required variables are specified on the command line."
135 @echo
" Run this target to display the variable names and current values."
137 @echo
"[2] release-bump-version"
138 @echo
" Bump the version to VERSION"
140 @echo
"[3] release-add-changelog"
141 @echo
" Add COMMITTER and COMMIT_STRING to the ChangeLogs."
143 @echo
"[4] release-commit"
144 @echo
" Commit the ChangeLogs and tag repository with TAG."
146 @echo
"[5] release-files or release-files-signed"
147 @echo
" Create the release tar-ball and diff file."
148 @echo
" release-files-signed creates detached GPG signature files as well."
150 @echo
"For a release, steps [1]-[5] need to be done. Immediately after"
151 @echo
"the release, we bump the version again by performing steps [1]-[4]"
152 @echo
"with the next VERSION and TAG."
156 $(MAKE
) COMMIT_STRING
='Bump version to $(VERSION).' release-bump-version
159 $(MAKE
) COMMIT_STRING
='Bump version to $(VERSION).' release-commit
161 # Needs GNU grep and a recent GNU sed:
162 release-bump-version
: release-check-settings
163 $(SED_I
) '/^(defconst gnus-version-number /s,"$(OLD_PATTERN)","$(VERSION)",' lisp
/gnus.el
164 $(SED_I
) '/^.newcommand{.gnusversionname}{$(CODENAME_PATTERN)Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi
/gnus.texi
165 $(SED_I
) '/^This manual corresponds to $(CODENAME_PATTERN)Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi
/gnus.texi
166 $(SED_I
) '/^@samp.{$(CODENAME_PATTERN)Gnus v.*@c Adjust Makefile/s,$(OLD_PATTERN),$(VERSION),' texi
/gnus.texi
167 $(SED_I
) '/^corresponding to this manual is $(CODENAME_PATTERN)Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi
/message.texi
168 $(SED_I
) 's,/[a-z]*gnus-[0-9.]*/,/$(CIN)gnus-$(VERSION)/,' README
169 if
[ "x$(CODENAME)" = "x" ]; then \
170 $(SED_I
) '/The current release ($(OLD_PATTERN)) should/s,$(OLD_PATTERN),$(VERSION),' texi
/gnus-faq.texi
; \
174 # Only for going from the development version to release...
175 if
[ "x$(CODENAME)" = "x" -a
"$(CODENAME_TO_STABLE)" = t
]; then \
176 $(SED_I
) '/^(defconst gnus-version /s,"$(CODENAME_PATTERN)Gnus v,"Gnus v,' lisp
/gnus.el
; \
177 $(SED_I
) '/^.newcommand{.gnusversionname}{$(CODENAME_PATTERN)Gnus v/s,$(CODENAME_PATTERN)Gnus v$(OLD_PATTERN),Gnus v$(VERSION),' texi
/gnus.texi
; \
178 $(SED_I
) '/^This manual corresponds to $(CODENAME_PATTERN)Gnus v/s,$(CODENAME_PATTERN)Gnus v$(OLD_PATTERN),Gnus v$(VERSION),' texi
/gnus.texi
; \
179 $(SED_I
) '/^corresponding to this manual is $(CODENAME_PATTERN)Gnus v/s,$(CODENAME_PATTERN)Gnus v$(OLD_PATTERN),Gnus v$(VERSION),' texi
/message.texi
; \
183 $(MAKE
) release-diff-commit-files
185 # Add ChangeLog entry...
186 release-add-changelog
: release-check-settings
187 @echo
"Updating ChangeLog files..."
188 @if grep
-q
"$(CODENAME)Gnus v$(VERSION) is released" ChangeLog
; then \
189 echo
"ChangeLog is already updated"; \
191 $(SED_I
) "1s|^|`date -I` $(COMMITTER)\n\n\t* README: $(COMMIT_STRING)\n\n|" ChangeLog
; \
193 @if grep
-q
"$(CODENAME)Gnus v$(VERSION) is released" etc
/ChangeLog
; then \
194 echo
"etc/ChangeLog is already updated"; \
196 $(SED_I
) "1s|^|`date -I` $(COMMITTER)\n\n\t* ChangeLog: $(COMMIT_STRING)\n\n|" etc
/ChangeLog
; \
198 @if grep
-q
"$(CODENAME)Gnus v$(VERSION) is released" texi
/ChangeLog
; then \
199 echo
"texi/ChangeLog is already updated"; \
201 $(SED_I
) "1s|^|`date -I` $(COMMITTER)\n\n\t* gnus.texi, gnus-faq.texi, message.texi: $(COMMIT_STRING)\n\n|" texi
/ChangeLog
; \
203 @if grep
-q
"$(CODENAME)Gnus v$(VERSION) is released" lisp
/ChangeLog
; then \
204 echo
"lisp/ChangeLog is already updated"; \
206 $(SED_I
) "1s|^|`date -I` $(COMMITTER)\n\n\t* gnus.el: $(COMMIT_STRING)\n\n|" lisp
/ChangeLog
; \
208 $(MAKE
) release-diff-commit-files
210 release-diff-commit-files
: release-check-settings
211 cvs diff
-U0
$(RELEASE_COMMIT_FILES
); sleep
2
213 release-revert-files
:
214 rm -i
$(RELEASE_COMMIT_FILES
)
215 cvs update
$(RELEASE_COMMIT_FILES
)
217 release-commit
: release-check-settings
220 @echo
"Really do the release-commit for $(CODENAME)Gnus v$(VERSION)?"
221 @echo
"Command line:"
222 @echo
" " cvs commit
-m
"$(COMMIT_STRING)" $(RELEASE_COMMIT_FILES
)
224 @echo
"Hit RET to continue or Ctrl-C to abort."
227 cvs commit
-m
"$(COMMIT_STRING)" $(RELEASE_COMMIT_FILES
)
229 @echo
"Add tag $(TAG) to CVS?"
230 @echo
"Command line:"
231 @echo
" " cvs tag
$(TAG
)
232 @echo
"Hit RET to continue or Ctrl-C to abort."
237 release-files
: release-make-tar-ball release-diff
238 @echo
"Release files have been created:"
239 @ls
-l
$(CIN
)gnus-
$(VERSION
).
tar.gz
240 @ls
-l
$(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
242 release-files-signed
: release-files release-sign-files
244 # Sign prepared files:
246 if
[ "x$$GPG_AGENT_INFO" = "x" ]; then \
247 read
-sp
"Enter pass phrase: " phrase
; \
248 gpg_opt
="--passphrase-fd 0"; \
250 gpg_opt
=""; phrase
=""; \
252 for i in
$(CIN
)gnus-
$(VERSION
).
tar.gz \
253 $(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
; do \
255 echo
"$$phrase" | gpg
--detach-sign
$$gpg_opt $$i; \
257 @ls
-l
$(CIN
)gnus-
$(VERSION
).
tar.gz
{.sig
,}
258 @ls
-l
$(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
{.sig
,}
259 @gpg
--verify
$(CIN
)gnus-
$(VERSION
).
tar.gz
{.sig
,}
260 @gpg
--verify
$(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
{.sig
,}
262 release-cvs-export
$(CIN
)gnus-
$(VERSION
): release-check-settings
263 rm -fr
$(CIN
)gnus-
$(VERSION
)
264 umask
0022; cvs
export -d
$(CIN
)gnus-
$(VERSION
) -r
$(TAG
) gnus
266 release-make-tar-ball
: $(CIN
)gnus-
$(VERSION
)
267 [ -d
$(CIN
)gnus-
$(VERSION
) ] && cd
$(CIN
)gnus-
$(VERSION
) && \
268 rm $(CVS_IGNORE_FILES
) || true
269 tar zcvf
$(CIN
)gnus-
$(VERSION
).
tar.gz
$(CIN
)gnus-
$(VERSION
)
270 ls
-l
$(CIN
)gnus-
$(VERSION
).
tar.gz
272 # Make a diff between current and previous release. Example:
273 # ftp://quimby.gnus.org/pub/gnus/ding-patches/gnus-5.10.5-5.10.6.diff.gz
274 release-diff
: release-check-settings
275 cvs diff
-r
$(OLD_TAG
) -r
$(TAG
) | sed
-e
'/^\? /d' > temp.diff || true
276 mv temp.diff
$(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
277 $(GZIP_PROG
) $(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
278 ls
-l
$(CIN
)gnus-
`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
280 release-post-clean
: release-check-settings
281 rm -fr
$(CIN
)gnus-
$(TAG
) temp.diff
283 # # # # # # # # # # End of release targets
285 # Tell versions [3.59,3.63) of GNU make to not export all variables.
286 # Otherwise a system limit (for SysV at least) may be exceeded.