1
1
## Makefile.maint -- Makefile rules for m4 maintainers -*-Makefile-*-
3
## Copyright (C) 2004, 2005 Free Software Foundation
3
## Copyright (C) 2004, 2005, 2006 Free Software Foundation
5
5
## This program is free software; you can redistribute it and/or modify
6
6
## it under the terms of the GNU General Public License as published by
17
17
## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
18
## Boston, MA 02110-1301, USA.
20
# Need various variables defined by configure, a lot easier to just
21
# include the Makefile than figure out a way to put them in here too
24
@echo " *** Run maintainer rules from the build tree, with"
25
@echo " *** \`make -f../Makefile.maint' for example, where"
26
@echo " *** \`../' is the relative path back to the directory"
27
@echo " *** that contains the \`Makefile.maint'. Alternatively,"
28
@echo " *** run \`./configure' in the source tree for an in"
29
@echo " *** tree build."
32
20
TEXI2HTML = texi2html
34
22
.PHONY: cvs-release
35
cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist deltas web-manual
23
cvs-release: version-check prev-tarball cvs-news cvs-commit cvs-dist deltas web-manual
36
24
@tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
37
25
diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
38
26
xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
80
68
## Make sure the NEWS file is up-to-date:
81
@if sed '1,3d;4q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
69
@if sed '1,4d;5q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
84
72
echo "NEWS not updated; not releasing" 1>&2; \
88
## Program to use to fetch files.
90
WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
92
## Files that we fetch and which we compare against.
93
## FIXME should be a lot more here
99
## Fetch the latest versions of files we care about.
102
rm -rf Fetchdir > /dev/null 2>&1
104
## If a get fails then that is a problem.
106
$(WGETSGO)/autoconf/autoconf/INSTALL; \
107
$(WGETSGO)/automake/automake/lib/install-sh; \
108
$(WGETSGO)/texinfo/texinfo/doc/texinfo.tex; \
109
$(WGETSGO)/texinfo/texinfo/util/gendocs.sh; \
110
$(WGETSGO)/texinfo/texinfo/util/gendocs_template; )
111
## Don't exit after test because we want to give as many errors as
113
@stat=0; for file in $(FETCHFILES); do \
114
fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
115
if diff -u $(srcdir)/$$file $$fetchedfile \
116
>>Fetchdir/update.patch 2>/dev/null; then :; \
119
echo "Updating $(srcdir)/$$file..."; \
120
cp $$fetchedfile $(srcdir)/$$file; \
124
echo "See Fetchdir/update.patch for a log of the changes."; \
128
GPG = gpg # set it to `:' to avoid gpg operations
130
76
.PHONY: cvs-commit
131
77
cvs-commit: cvs-news
132
78
cd $(srcdir) && $(SHELL) ./commit
138
84
## Finally, if everything was successful, tag the release
140
86
&& $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./_/g'`
141
## Generate signatures and directives for FSF ftp-upload:
142
for suffix in .gz .bz2; do \
143
ofile="$(PACKAGE)-$(VERSION).tar$$suffix"; \
144
$(GPG) --detach-sign $$ofile \
145
&& echo "directory: $(PACKAGE)" > $$ofile.directive \
146
&& $(GPG) --clearsign $$ofile.directive \
147
&& rm -f $$ofile.directive; \
150
88
.PHONY: new-tarball
182
120
&& tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
183
121
&& $(DIFF) $(DIFF_OPTIONS) \
184
122
$(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
185
| GZIP=$(GZIP_ENV) gzip -c > $$ofile \
186
&& $(GPG) --detach-sign $$ofile \
187
&& echo "directory: $(PACKAGE)" > $$ofile.directive \
188
&& $(GPG) --clearsign $$ofile.directive \
189
&& rm -f $$ofile.directive
123
| GZIP=$(GZIP_ENV) gzip -c > $$ofile
191
125
rm -rf delta-diff
196
130
.PHONY: delta-xdelta
197
131
delta-xdelta: prev-tarball new-tarball got-xdelta
198
## Generate the delta file (xdelta has wierd exit statuses, so we need to
132
## Generate the delta file (xdelta has weird exit statuses, so we need to
199
133
## add some shell code to keep make happy), and then generate the signatures
200
134
## for FSF ftp-upload:
201
135
ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
202
136
( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
203
137
$(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
206
&& $(GPG) --detach-sign $$ofile \
207
&& echo "directory: $(PACKAGE)" > $$ofile.directive \
208
&& $(GPG) --clearsign $$ofile.directive \
209
&& rm -f $$ofile.directive
211
141
.PHONY: web-manual
213
@ln -s `cd $(srcdir) && pwd`/doc/$(PACKAGE).texinfo doc/$(PACKAGE).texi
214
@ln -s `cd $(srcdir) && pwd`/doc/version.texi doc/version.texi
215
@ln -s `pwd`/Fetchdir/gendocs.sh doc/gendocs.sh
216
@ln -s `pwd`/Fetchdir/gendocs_template doc/gendocs_template
218
$(SHELL) ./gendocs.sh $(PACKAGE) "GNU $(PACKAGE) - GNU macro processor"
219
@rm -rf doc/$(PACKAGE).texi doc/version.texi doc/gendocs* manual
221
@echo " *** Upload the manual directory to web-cvs."
144
$(SHELL) ../gendocs.sh $(PACKAGE) \
145
"GNU $(PACKAGE)- GNU macro processor"
146
@echo " *** Upload the doc/manual directory to web-cvs."