forked from espenhw/gnus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
295 lines (254 loc) · 10.5 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
prefix = @prefix@
# Avoid "WARNING: Makefile.in seems to ignore the --datarootdir setting":
datarootdir = @datarootdir@
datadir = @datadir@
lispdir = @lispdir@
srcdir = @srcdir@
@SET_MAKE@
EMACS = @EMACS@
XEMACS = @EMACS@
GZIP_PROG = gzip -f
SED_I = sed -i -e
# # # # # # # # # # Release variables (for maintainer only):
#
# Files removed from `cvs export' output before creating the tar-ball:
CVS_IGNORE_FILES = .cvsignore contrib/.cvsignore etc/.cvsignore \
lisp/.cvsignore texi/.cvsignore texi/ps/.cvsignore .arch-inventory
# Name and mail address in ChangeLog format for the release commit:
COMMITTER = Lars Magne Ingebrigtsen <[email protected]>
# CODENAME for development releases (CODENAME must have a trailing space,
# (e.g. "Oort ")
CODENAME =
# Codename initial (lower case), e.g. 'n' for "No Gnus".
CIN =
# Files with hard-coded versions numbers:
RELEASE_COMMIT_FILES = ChangeLog \
etc/ChangeLog lisp/ChangeLog texi/ChangeLog \
README lisp/gnus.el \
texi/gnus.texi texi/message.texi texi/gnus-faq.texi
# Pattern matching previous version numbers:
OLD_PATTERN = \(5\.[0-9][0-9]\.[0-9]*\|5\.[0-9][0-9]\|0\.[1-9][0-9]*\)
# Codename pattern
CODENAME_PATTERN = [A-Z]*[a-z]* *
# CVS tag of the previous version:
OLD_TAG = v5-10-6
# CVS tag of the current release:
TAG = v5-10
#
COMMIT_STRING = $(CODENAME)Gnus v$(VERSION) is released.
# # # # # # # # # # End of release variables
all: lick info
fail-on-warning: lick-fail-on-warning info
lick:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" all
lick-fail-on-warning:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" fail-on-warning
install:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" install
cd texi && $(MAKE) EMACS="$(EMACS)" install
cd etc && $(MAKE) EMACS="$(EMACS)" install
list-installed-shadows:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" list-installed-shadows
remove-installed-shadows:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" remove-installed-shadows
uninstall:
cd lisp && $(MAKE) lispdir="$(lispdir)" uninstall
cd texi && $(MAKE) uninstall
cd etc && $(MAKE) uninstall
GNUS-NEWS: texi/gnus-news.texi
cd texi && $(MAKE) GNUS-NEWS
check:
cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" check
# Rule for Lars and nobody else.
some:
cd lisp && $(MAKE) EMACS="$(EMACS)" some
l:
cd lisp && $(MAKE) EMACS="$(EMACS)" clever
info:
cd texi && $(MAKE) EMACS="$(EMACS)" all
clean:
for i in lisp texi etc texi/ps; do (cd $$i; $(MAKE) clean); done
rm -f *.orig *.rej *~
elclean:
cd lisp && rm -f *.elc auto-autoloads.el custom-load.el gnus-load.el
x:
$(MAKE) EMACS=$(XEMACS)
xsome:
$(MAKE) EMACS="$(XEMACS)" some
distclean: clean
for i in lisp texi etc texi/ps; do (cd $$i; $(MAKE) distclean); done
rm -f config.log config.status config.cache Makefile
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && autoconf
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
# # # # # # # # # # Release targets (for maintainer only):
release-check-settings:
@echo
@echo "COMMITTER = '$(COMMITTER)'"
@echo " (example: 'Foo Bar <[email protected]>')"
@echo "VERSION = '$(VERSION)' (example: '5.10.6')"
@echo "TAG = '$(TAG)' (example: 'v5-10-6')"
@echo "OLD_TAG = '$(OLD_TAG)' (example: 'v5-10-5')"
@echo
@echo "# Only for development versions:"
@echo "CODENAME = '$(CODENAME)' (example: 'No ')"
@echo "CIN = '$(CIN)' (example: 'n', codename initial)"
@echo
@if [ x"$(VERSION)" = x ]; then echo "error: No VERSION given."; exit 1; else :; fi
@if [ x"$(TAG)" = x ]; then echo "error: No TAG given."; exit 1; else :; fi
@echo
@echo Settings checked successfully.
@echo
@echo You may now make...
@echo release-bump-version
@echo release-add-changelog
@echo release-commit
@echo release-files or release-files-signed
release-help:
@echo "Available targets for releases:"
@echo
@echo "[0] release-help"
@echo " Display this help message."
@echo
@echo "[1] release-check-settings"
@echo " Check it all required variables are specified on the command line."
@echo " Run this target to display the variable names and current values."
@echo
@echo "[2] release-bump-version"
@echo " Bump the version to VERSION"
@echo
@echo "[3] release-add-changelog"
@echo " Add COMMITTER and COMMIT_STRING to the ChangeLogs."
@echo
@echo "[4] release-commit"
@echo " Commit the ChangeLogs and tag repository with TAG."
@echo
@echo "[5] release-files or release-files-signed"
@echo " Create the release tar-ball and diff file."
@echo " release-files-signed creates detached GPG signature files as well."
@echo
@echo "For a release, steps [1]-[5] need to be done. Immediately after"
@echo "the release, we bump the version again by performing steps [1]-[4]"
@echo "with the next VERSION and TAG."
@echo
bump-version:
$(MAKE) COMMIT_STRING='Bump version to $(VERSION).' release-bump-version
bump-version-commit:
$(MAKE) COMMIT_STRING='Bump version to $(VERSION).' release-commit
# Needs GNU grep and a recent GNU sed:
release-bump-version: release-check-settings
$(SED_I) '/^(defconst gnus-version-number /s,"$(OLD_PATTERN)","$(VERSION)",' lisp/gnus.el
$(SED_I) '/^.newcommand{.gnusversionname}{$(CODENAME_PATTERN)Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi/gnus.texi
$(SED_I) '/^This manual corresponds to $(CODENAME_PATTERN)Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi/gnus.texi
$(SED_I) '/^@samp.{$(CODENAME_PATTERN)Gnus v.*@c Adjust Makefile/s,$(OLD_PATTERN),$(VERSION),' texi/gnus.texi
$(SED_I) '/^corresponding to this manual is $(CODENAME_PATTERN)Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi/message.texi
$(SED_I) 's,/[a-z]*gnus-[0-9.]*/,/$(CIN)gnus-$(VERSION)/,' README
if [ "x$(CODENAME)" = "x" ]; then \
$(SED_I) '/The current release ($(OLD_PATTERN)) should/s,$(OLD_PATTERN),$(VERSION),' texi/gnus-faq.texi; \
else \
true; \
fi
# Only for going from the development version to release...
if [ "x$(CODENAME)" = "x" -a "$(CODENAME_TO_STABLE)" = t ]; then \
$(SED_I) '/^(defconst gnus-version /s,"$(CODENAME_PATTERN)Gnus v,"Gnus v,' lisp/gnus.el; \
$(SED_I) '/^.newcommand{.gnusversionname}{$(CODENAME_PATTERN)Gnus v/s,$(CODENAME_PATTERN)Gnus v$(OLD_PATTERN),Gnus v$(VERSION),' texi/gnus.texi; \
$(SED_I) '/^This manual corresponds to $(CODENAME_PATTERN)Gnus v/s,$(CODENAME_PATTERN)Gnus v$(OLD_PATTERN),Gnus v$(VERSION),' texi/gnus.texi; \
$(SED_I) '/^corresponding to this manual is $(CODENAME_PATTERN)Gnus v/s,$(CODENAME_PATTERN)Gnus v$(OLD_PATTERN),Gnus v$(VERSION),' texi/message.texi; \
else \
true; \
fi
$(MAKE) release-diff-commit-files
# Add ChangeLog entry...
release-add-changelog: release-check-settings
@echo "Updating ChangeLog files..."
@if grep -q "$(CODENAME)Gnus v$(VERSION) is released" ChangeLog; then \
echo "ChangeLog is already updated"; \
else \
$(SED_I) "1s|^|`date -I` $(COMMITTER)\n\n\t* README: $(COMMIT_STRING)\n\n|" ChangeLog; \
fi
@if grep -q "$(CODENAME)Gnus v$(VERSION) is released" etc/ChangeLog; then \
echo "etc/ChangeLog is already updated"; \
else \
$(SED_I) "1s|^|`date -I` $(COMMITTER)\n\n\t* ChangeLog: $(COMMIT_STRING)\n\n|" etc/ChangeLog; \
fi
@if grep -q "$(CODENAME)Gnus v$(VERSION) is released" texi/ChangeLog; then \
echo "texi/ChangeLog is already updated"; \
else \
$(SED_I) "1s|^|`date -I` $(COMMITTER)\n\n\t* gnus.texi, gnus-faq.texi, message.texi: $(COMMIT_STRING)\n\n|" texi/ChangeLog; \
fi
@if grep -q "$(CODENAME)Gnus v$(VERSION) is released" lisp/ChangeLog; then \
echo "lisp/ChangeLog is already updated"; \
else \
$(SED_I) "1s|^|`date -I` $(COMMITTER)\n\n\t* gnus.el: $(COMMIT_STRING)\n\n|" lisp/ChangeLog; \
fi
$(MAKE) release-diff-commit-files
release-diff-commit-files: release-check-settings
cvs diff -U0 $(RELEASE_COMMIT_FILES); sleep 2
release-revert-files:
rm -i $(RELEASE_COMMIT_FILES)
cvs update $(RELEASE_COMMIT_FILES)
release-commit: release-check-settings
@echo -e '\007'
@echo
@echo "Really do the release-commit for $(CODENAME)Gnus v$(VERSION)?"
@echo "Command line:"
@echo " " cvs commit -m "$(COMMIT_STRING)" $(RELEASE_COMMIT_FILES)
@echo
@echo "Hit RET to continue or Ctrl-C to abort."
@echo
@read dummy
cvs commit -m "$(COMMIT_STRING)" $(RELEASE_COMMIT_FILES)
@echo
@echo "Add tag $(TAG) to CVS?"
@echo "Command line:"
@echo " " cvs tag $(TAG)
@echo "Hit RET to continue or Ctrl-C to abort."
@echo
@read dummy
cvs tag $(TAG)
release-files: release-make-tar-ball release-diff
@echo "Release files have been created:"
@ls -l $(CIN)gnus-$(VERSION).tar.gz
@ls -l $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
release-files-signed: release-files release-sign-files
# Sign prepared files:
release-sign-files:
if [ "x$$GPG_AGENT_INFO" = "x" ]; then \
read -sp "Enter pass phrase: " phrase ; \
gpg_opt="--passphrase-fd 0"; \
else \
gpg_opt=""; phrase=""; \
fi; \
for i in $(CIN)gnus-$(VERSION).tar.gz \
$(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz; do \
rm -f $$i.sig; \
echo "$$phrase" | gpg --detach-sign $$gpg_opt $$i; \
done; true
@ls -l $(CIN)gnus-$(VERSION).tar.gz{.sig,}
@ls -l $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz{.sig,}
@gpg --verify $(CIN)gnus-$(VERSION).tar.gz{.sig,}
@gpg --verify $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz{.sig,}
release-cvs-export $(CIN)gnus-$(VERSION): release-check-settings
rm -fr $(CIN)gnus-$(VERSION)
umask 0022; cvs export -d $(CIN)gnus-$(VERSION) -r $(TAG) gnus
release-make-tar-ball: $(CIN)gnus-$(VERSION)
[ -d $(CIN)gnus-$(VERSION) ] && cd $(CIN)gnus-$(VERSION) && \
rm $(CVS_IGNORE_FILES) || true
tar zcvf $(CIN)gnus-$(VERSION).tar.gz $(CIN)gnus-$(VERSION)
ls -l $(CIN)gnus-$(VERSION).tar.gz
# Make a diff between current and previous release. Example:
# ftp://quimby.gnus.org/pub/gnus/ding-patches/gnus-5.10.5-5.10.6.diff.gz
release-diff: release-check-settings
cvs diff -r $(OLD_TAG) -r $(TAG) | sed -e '/^\? /d' > temp.diff || true
mv temp.diff $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
$(GZIP_PROG) $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
ls -l $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
release-post-clean: release-check-settings
rm -fr $(CIN)gnus-$(TAG) temp.diff
# # # # # # # # # # End of release targets
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: