1 ## Makefile.maint -- Makefile rules for m4 maintainers -*-Makefile-*-
3 ## Copyright (C) 2004, 2005, 2006 Free Software Foundation
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; see the file COPYING. If not, write to
17 ## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 ## Boston, MA 02110-1301, USA.
23 cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist deltas web-manual
24 @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
25 diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
26 xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
27 echo " *** Upload $$tarname, $$tarname.sig,";\
28 echo " *** $$tarname.directive.asc, $$diffname,"; \
29 echo " *** $$diffname.sig, $$diffname.directive.asc,"; \
30 echo " *** $$xdeltaname, $$xdeltaname.sig and";\
31 echo " *** $$xdeltaname.directive.asc to either"
32 echo " *** /incoming/alpha or /incoming/ftp on ftp-upload.gnu.org."
38 echo "Version \`$(VERSION)' is not a releasable version, please read:"; \
39 echo " http://www.gnu.org/software/libtool/contribute.html"; \
46 ## Make sure we have the previous release tarball in the tree.
47 @if test -z "$(LASTRELEASE)"; \
48 then echo "LASTRELEASE is not set"; exit 1; fi
49 @ofile="$(PACKAGE)-$(LASTRELEASE).tar.gz"; \
50 if test -f $$ofile; then :; \
51 else echo "Cannot make deltas without $$ofile"; exit 1; fi
53 # TSDEPS will be defined to TSDEPS_DIST at `make dist' time
55 TSDEPS_DIST = ChangeLog
56 CVS = cvs # set it to `:' to avoid CVS operations
58 .PHONY: timestamps update-timestamps
59 timestamps: update-timestamps
61 @if (cd $(srcdir) && test -d CVS && \
62 $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \
63 echo "Cannot make cvs-dist before commit"; exit 1; else :; fi
68 ## Make sure the NEWS file is up-to-date:
69 @if sed '1,4d;5q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
72 echo "NEWS not updated; not releasing" 1>&2; \
76 ## Program to use to fetch files.
78 WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
80 ## Files that we fetch and which we compare against.
81 ## FIXME should be a lot more here
87 ## Fetch the latest versions of files we care about.
90 rm -rf Fetchdir > /dev/null 2>&1
92 ## If a get fails then that is a problem.
94 $(WGETSGO)/autoconf/autoconf/INSTALL; \
95 $(WGETSGO)/automake/automake/lib/install-sh; \
96 $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex; )
97 ## Don't exit after test because we want to give as many errors as
99 @stat=0; for file in $(FETCHFILES); do \
100 fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
101 if diff -u $(srcdir)/$$file $$fetchedfile \
102 >>Fetchdir/update.patch 2>/dev/null; then :; \
105 echo "Updating $(srcdir)/$$file..."; \
106 cp $$fetchedfile $(srcdir)/$$file; \
110 echo "See Fetchdir/update.patch for a log of the changes."; \
114 GPG = gpg # set it to `:' to avoid gpg operations
118 cd $(srcdir) && $(SHELL) ./commit
121 cvs-dist: cvs-news timestamps
122 ## Build the distribution:
124 ## Finally, if everything was successful, tag the release
126 && $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./_/g'`
127 ## Generate signatures and directives for FSF ftp-upload:
128 for suffix in .gz .bz2; do \
129 ofile="$(PACKAGE)-$(VERSION).tar$$suffix"; \
130 $(GPG) --detach-sign $$ofile \
131 && echo "directory: $(PACKAGE)" > $$ofile.directive \
132 && $(GPG) --clearsign $$ofile.directive \
133 && rm -f $$ofile.directive; \
138 ## Make sure we have the new release tarball in the tree.
139 @ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
140 if test -f $$ofile; then :; \
141 else echo "Cannot make deltas without $$ofile"; exit 1; fi
145 ## Make sure xdelta exists;
146 @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
149 echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
154 deltas: delta-diff delta-xdelta
160 delta-diff: prev-tarball new-tarball
161 ## Unpack the tarballs somewhere to diff them
165 ofile="../$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
167 && tar xzf "../$(PACKAGE)-$(LASTRELEASE).tar.gz" \
168 && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
169 && $(DIFF) $(DIFF_OPTIONS) \
170 $(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
171 | GZIP=$(GZIP_ENV) gzip -c > $$ofile \
172 && $(GPG) --detach-sign $$ofile \
173 && echo "directory: $(PACKAGE)" > $$ofile.directive \
174 && $(GPG) --clearsign $$ofile.directive \
175 && rm -f $$ofile.directive
183 delta-xdelta: prev-tarball new-tarball got-xdelta
184 ## Generate the delta file (xdelta has weird exit statuses, so we need to
185 ## add some shell code to keep make happy), and then generate the signatures
186 ## for FSF ftp-upload:
187 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
188 ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
189 $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
192 && $(GPG) --detach-sign $$ofile \
193 && echo "directory: $(PACKAGE)" > $$ofile.directive \
194 && $(GPG) --clearsign $$ofile.directive \
195 && rm -f $$ofile.directive
199 @cd "$(abs_srcdir)/doc"; \
200 $(SHELL) "$(abs_srcdir)/gendocs.sh" $(PACKAGE) \
201 "GNU $(PACKAGE)- GNU macro processor"
202 @echo " *** Upload the doc/manual directory to web-cvs."