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