878454aebf8034e7ff19b1dccd2d27c25e264a4e
[gnus] / Makefile.in
1 prefix = @prefix@
2 datadir = @datadir@
3 lispdir = @lispdir@
4 srcdir = @srcdir@
5
6 @SET_MAKE@
7 EMACS = @EMACS@
8 XEMACS = @EMACS@
9
10 GZIP_PROG = gzip -f
11
12 # # # # # # # # # # Release variables (for maintainer only):
13 #
14 # Files removed from `cvs export' output before creating the tar-ball:
15 CVS_IGNORE_FILES = .cvsignore contrib/.cvsignore etc/.cvsignore \
16   lisp/.cvsignore texi/.cvsignore texi/ps/.cvsignore .arch-inventory
17 # Name and mail address in ChangeLog format for the release commit:
18 COMMITTER = Lars Magne Ingebrigtsen  <lars@ingebrigtsen.no>
19 # CODENAME for development releases (CODENAME must have a trailing space,
20 # (e.g. "Oort ")
21 CODENAME = 
22 # Codename initial (lower case), e.g. 'n' for "No Gnus".
23 CIN =
24 # Files with hard-coded versions numbers:
25 RELEASE_COMMIT_FILES = ChangeLog README \
26   lisp/ChangeLog lisp/gnus.el \
27   texi/ChangeLog texi/gnus.texi texi/message.texi texi/gnus-faq.texi
28 # Pattern matching previous version(s):
29 OLD_PATTERN = \(5.10.[0-9]*\|0\.[1-9][0-9]*\)
30 # CVS tag of the previous version:
31 OLD_TAG     = v5-10-6
32 # CVS tag of the current release:
33 TAG  = v5-10
34 #
35 COMMIT_STRING = $(CODENAME)Gnus v$(VERSION) is released.
36 #
37 # Procedure:
38 # - release-bump-version
39 # - release-commit
40 # - release-files or release-files-signed
41 #
42 # # # # # # # # # # End of release variables
43
44 all: lick info
45
46 lick:
47         cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" all
48
49 install:
50         cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" install
51         cd texi && $(MAKE) EMACS="$(EMACS)" install
52         cd etc && $(MAKE) EMACS="$(EMACS)" install
53
54 list-installed-shadows:
55         cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" list-installed-shadows
56
57 remove-installed-shadows:
58         cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" remove-installed-shadows
59
60 uninstall:
61         cd lisp && $(MAKE) lispdir="$(lispdir)" uninstall
62         cd texi && $(MAKE) uninstall
63         cd etc && $(MAKE) uninstall
64
65 GNUS-NEWS: texi/gnus-news.texi
66         cd texi && $(MAKE) GNUS-NEWS
67
68 # Rule for Lars and nobody else.
69 some:
70         cd lisp && $(MAKE) EMACS="$(EMACS)" some
71 l:
72         cd lisp && $(MAKE) EMACS="$(EMACS)" clever
73
74 info:
75         cd texi && $(MAKE) EMACS="$(EMACS)" all
76
77 clean:
78         for i in lisp texi etc texi/ps; do (cd $$i; $(MAKE) clean); done
79         rm -f *.orig *.rej *~
80
81 elclean:
82         cd lisp && rm -f *.elc auto-autoloads.el custom-load.el gnus-load.el
83
84 x:
85         $(MAKE) EMACS=$(XEMACS)
86
87 xsome:
88         $(MAKE) EMACS="$(XEMACS)" some
89
90 distclean: clean
91         for i in lisp texi etc texi/ps; do (cd $$i; $(MAKE) distclean); done
92         rm -f config.log config.status config.cache Makefile
93
94 config.status: $(srcdir)/configure
95         $(SHELL) ./config.status --recheck
96 $(srcdir)/configure: $(srcdir)/configure.in
97         cd $(srcdir) && autoconf
98 Makefile: $(srcdir)/Makefile.in config.status
99         CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
100
101 # # # # # # # # # # Release targets (for maintainer only):
102
103 release-check-settings:
104         @echo
105         @echo "COMMITTER = '$(COMMITTER)'"
106         @echo "  (example: 'Foo Bar  <foo.bar@somewhere.invalid>')"
107         @echo "VERSION   = '$(VERSION)' (example: '5.10.6')"
108         @echo "CODENAME  = '$(CODENAME)' (example: 'No ')"
109         @echo "CIN       = '$(CIN)' (example: 'n', codename initial)"
110         @echo "TAG       = '$(TAG)' (example: 'v5-10-6')"
111         @echo "OLD_TAG   = '$(OLD_TAG)' (example: 'v5-10-5')"
112         @echo
113         @if [ x"$(VERSION)" = x ]; then echo "error: No VERSION given."; exit 1; else :; fi
114         @if [ x"$(TAG)" = x ]; then echo "error: No TAG given."; exit 1; else :; fi
115         @echo
116         @echo Settings checked successfully.
117         @echo
118         @echo You may now make...
119         @echo   release-bump-version
120         @echo   release-commit
121         @echo   release-files or release-files-signed
122
123 bump-version:
124         $(MAKE) COMMIT_STRING='Bump version to $(VERSION).' release-bump-version
125
126 bump-version-commit:
127         $(MAKE) COMMIT_STRING='Bump version to $(VERSION).' release-commit
128
129 # Needs GNU grep and a recent GNU sed:
130 release-bump-version:   release-check-settings
131         sed -i -e '/^(defconst gnus-version-number /s,"$(OLD_PATTERN)","$(VERSION)",' lisp/gnus.el
132         sed -i -e '/^.newcommand{.gnusversionname}{[A-Za-z ]*Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi/gnus.texi
133         sed -i -e '/^This manual corresponds to [A-Za-z ]*Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi/gnus.texi
134         sed -i -e '/^@samp.{[A-Za-z ]*Gnus v.*@c Adjust Makefile/s,$(OLD_PATTERN),$(VERSION),' texi/gnus.texi
135         sed -i -e '/^corresponding to this manual is [A-Za-z ]*Gnus v/s,$(OLD_PATTERN),$(VERSION),' texi/message.texi
136         sed -i -e 's,/[a-z]*gnus-[0-9.]*/,/$(CIN)gnus-$(VERSION)/,' README
137         if [ "x$(CODENAME)" = "x" ]; then \
138           sed -i -e '/The current release ($(OLD_PATTERN)) should/s,$(OLD_PATTERN),$(VERSION),' texi/gnus-faq.texi; \
139         else \
140           true; \
141         fi
142         @if grep -q "$(CODENAME)Gnus v$(VERSION) is released" ChangeLog; then \
143           echo "ChangeLog is already updated"; \
144         else \
145           sed -i -e "1s|^|`date -I`  $(COMMITTER)\n\n\t* README: $(COMMIT_STRING)\n\n|" ChangeLog; \
146         fi
147         @if grep -q "$(CODENAME)Gnus v$(VERSION) is released" texi/ChangeLog; then \
148           echo "texi/ChangeLog is already updated"; \
149         else \
150           sed -i -e "1s|^|`date -I`  $(COMMITTER)\n\n\t* gnus.texi, gnus-faq.texi, message.texi: $(COMMIT_STRING)\n\n|" texi/ChangeLog; \
151         fi
152         @if grep -q "$(CODENAME)Gnus v$(VERSION) is released" lisp/ChangeLog; then \
153           echo "lisp/ChangeLog is already updated"; \
154         else \
155           sed -i -e "1s|^|`date -I`  $(COMMITTER)\n\n\t* gnus.el: $(COMMIT_STRING)\n\n|" lisp/ChangeLog; \
156         fi
157         cvs diff -U0 $(RELEASE_COMMIT_FILES); sleep 2
158
159 release-revert-files:
160         rm -i      $(RELEASE_COMMIT_FILES)
161         cvs update $(RELEASE_COMMIT_FILES)
162
163 release-commit: release-check-settings
164         @echo -e '\007'
165         @echo
166         @echo "Really do the release-commit for $(CODENAME)Gnus v$(VERSION)?"
167         @echo "Command line:"
168         @echo "  " cvs commit -m "$(COMMIT_STRING)" $(RELEASE_COMMIT_FILES)
169         @echo
170         @echo "Hit RET to continue or Ctrl-C to abort."
171         @echo
172         @read dummy
173         cvs commit -m "$(COMMIT_STRING)" $(RELEASE_COMMIT_FILES)
174         @echo
175         @echo "Add tag $(TAG) to CVS?"
176         @echo "Command line:"
177         @echo "  " cvs tag $(TAG)
178         @echo "Hit RET to continue or Ctrl-C to abort."
179         @echo
180         @read dummy
181         cvs tag $(TAG)
182
183 release-files:  release-make-tar-ball release-diff
184         @echo "Release files have been created:"
185         @ls -l $(CIN)gnus-$(VERSION).tar.gz
186         @ls -l $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
187
188 release-files-signed:   release-files release-sign-files
189
190 # Sign prepared files:
191 release-sign-files:
192         if [ "x$$GPG_AGENT_INFO" = "x" ]; then \
193           read -sp "Enter pass phrase: " phrase ; \
194           gpg_opt="--passphrase-fd 0"; \
195         else \
196           gpg_opt=""; phrase=""; \
197         fi; \
198         for i in $(CIN)gnus-$(VERSION).tar.gz \
199                  $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz; do \
200            rm -f $$i.sig; \
201            echo "$$phrase" | gpg --detach-sign $$gpg_opt $$i; \
202         done; true
203         @ls -l $(CIN)gnus-$(VERSION).tar.gz{.sig,}
204         @ls -l $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz{.sig,}
205         @gpg --verify $(CIN)gnus-$(VERSION).tar.gz{.sig,}
206         @gpg --verify $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz{.sig,}
207
208 release-cvs-export $(CIN)gnus-$(VERSION):       release-check-settings
209         rm -fr $(CIN)gnus-$(VERSION)
210         cvs export -d $(CIN)gnus-$(VERSION) -r $(TAG) gnus
211
212 release-make-tar-ball:  $(CIN)gnus-$(VERSION)
213         [ -d $(CIN)gnus-$(VERSION) ] && cd $(CIN)gnus-$(VERSION) && \
214           rm $(CVS_IGNORE_FILES) || true
215         tar zcvf $(CIN)gnus-$(VERSION).tar.gz $(CIN)gnus-$(VERSION)
216         ls -l $(CIN)gnus-$(VERSION).tar.gz
217
218 # Make a diff between current and previous release.  Example:
219 # ftp://quimby.gnus.org/pub/gnus/ding-patches/gnus-5.10.5-5.10.6.diff.gz
220 release-diff:   release-check-settings
221         cvs diff -r $(OLD_TAG) -r $(TAG) | sed -e '/^\? /d' > temp.diff || true
222         mv temp.diff $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
223         $(GZIP_PROG) $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff
224         ls -l        $(CIN)gnus-`echo $(OLD_TAG)%$(TAG)|tr - .|tr -d v|tr % -`.diff.gz
225
226 release-post-clean:     release-check-settings
227         rm -fr $(CIN)gnus-$(TAG) temp.diff
228
229 # # # # # # # # # # End of release targets
230
231 # Tell versions [3.59,3.63) of GNU make to not export all variables.
232 # Otherwise a system limit (for SysV at least) may be exceeded.
233 .NOEXPORT: