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 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; \
78 cd $(srcdir) && $(SHELL) ./commit
81 cvs-dist: cvs-news timestamps
82 ## Build the distribution:
84 ## Finally, if everything was successful, tag the release
86 && $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./_/g'`
90 ## Make sure we have the new release tarball in the tree.
91 @ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
92 if test -f $$ofile; then :; \
93 else echo "Cannot make deltas without $$ofile"; exit 1; fi
97 ## Make sure xdelta exists;
98 @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
101 echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
106 deltas: delta-diff delta-xdelta
112 delta-diff: prev-tarball new-tarball
113 ## Unpack the tarballs somewhere to diff them
117 ofile="../$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
119 && tar xzf "../$(PACKAGE)-$(LASTRELEASE).tar.gz" \
120 && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
121 && $(DIFF) $(DIFF_OPTIONS) \
122 $(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
123 | GZIP=$(GZIP_ENV) gzip -c > $$ofile
131 delta-xdelta: prev-tarball new-tarball got-xdelta
132 ## Generate the delta file (xdelta has weird exit statuses, so we need to
133 ## add some shell code to keep make happy), and then generate the signatures
134 ## for FSF ftp-upload:
135 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
136 ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
137 $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
144 $(SHELL) ../gendocs.sh $(PACKAGE) \
145 "GNU $(PACKAGE)- GNU macro processor"
146 @echo " *** Upload the doc/manual directory to web-cvs."