1 ## Makefile.maint -- Makefile rules for libtool maintainers
3 ## Copyright (C) 2004 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., 59 Temple Place - Suite 330,
18 ## Boston, MA 02111-1307, 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 " *** Source directory must be configured to use the "
25 @echo " *** maintainer rules."
31 cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist deltas web-manual
32 @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
33 diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
34 xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
35 echo " *** Upload $$tarname, $$tarname.sig,";\
36 echo " *** $$tarname.directive.asc, $$diffname,"; \
37 echo " *** $$diffname.sig, $$diffname.directive.asc,"; \
38 echo " *** $$xdeltaname, $$xdeltaname.sig and";\
39 echo " *** $$xdeltaname.directive.asc to either"
40 echo " *** /incoming/alpha or /incoming/ftp on ftp-upload.gnu.org."
41 echo " *** You might need to upload manual.html to webcvs/libtool."
47 echo "Version \`$(VERSION)' is not a releasable version, please read:"; \
48 echo " http://www.gnu.org/software/libtool/contribute.html"; \
55 ## Make sure we have the previous release tarball in the tree.
56 @if test -z "$(LASTRELEASE)"; \
57 then echo "LASTRELEASE is not set"; exit 1; fi
58 @ofile="$(PACKAGE)-$(LASTRELEASE).tar.gz"; \
59 if test -f $$ofile; then :; \
60 else echo "Cannot make deltas without $$ofile"; exit 1; fi
62 # TSDEPS will be defined to TSDEPS_DIST at `make dist' time
64 TSDEPS_DIST = ChangeLog m4/libtool.m4
65 CVS = cvs # set it to `:' to avoid CVS operations
67 .PHONY: timestamps update-timestamps
68 timestamps: update-timestamps
70 @if (cd $(srcdir) && test -d CVS && \
71 $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \
72 echo "Cannot make cvs-dist before commit"; exit 1; else :; fi
77 ## Make sure the NEWS file is up-to-date:
78 @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
81 echo "NEWS not updated; not releasing" 1>&2; \
85 ## Program to use to fetch files.
87 WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
89 ## Files that we fetch and which we compare against.
90 ## FIXME should be a lot more here
97 ## Fetch the latest versions of files we care about.
100 rm -rf Fetchdir > /dev/null 2>&1
102 ## If a get fails then that is a problem.
104 $(WGETSGO)/autoconf/autoconf/INSTALL; \
105 $(WGETSGO)/config/config/config.guess; \
106 $(WGETSGO)/config/config/config.sub; \
107 $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex )
108 ## Don't exit after test because we want to give as many errors as
110 @stat=0; for file in $(FETCHFILES); do \
111 fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
112 if diff -u $(srcdir)/$$file $$fetchedfile \
113 >>Fetchdir/update.patch 2>/dev/null; then :; \
116 echo "Updating $(srcdir)/$$file..."; \
117 cp $$fetchedfile $(srcdir)/$$file; \
121 echo "See Fetchdir/update.patch for a log of the changes."; \
125 GPG = gpg # set it to `:' to avoid gpg operations
129 cd $(srcdir) && $(SHELL) ./commit
132 cvs-dist: cvs-news timestamps
133 ## Build the distribution:
135 ## Finally, if everything was successful, tag the release
137 && $(CVS) -q tag -c `echo "release-$(VERSION)" | sed 's/\./-/g'`
138 ## Generate signatures and directives for FSF ftp-upload:
139 ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
140 $(GPG) --detach-sign $$ofile \
141 && echo "directory: libtool" > $$ofile.directive \
142 && $(GPG) --clearsign $$ofile.directive \
143 && rm -f $$ofile.directive
147 ## Make sure we have the new release tarball in the tree.
148 @ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
149 if test -f $$ofile; then :; \
150 else echo "Cannot make deltas without $$ofile"; exit 1; fi
154 ## Make sure xdelta exists;
155 @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
158 echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
163 deltas: delta-diff delta-xdelta
169 delta-diff: prev-tarball new-tarball
170 ## Unpack the tarballs somewhere to diff them
174 ofile="../$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
176 && tar xzf "../$(PACKAGE)-$(LASTRELEASE).tar.gz" \
177 && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
178 && $(DIFF) $(DIFF_OPTIONS) \
179 $(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
180 | GZIP=$(GZIP_ENV) gzip -c > $$ofile \
181 && $(GPG) --detach-sign $$ofile \
182 && echo "directory: libtool" > $$ofile.directive \
183 && $(GPG) --clearsign $$ofile.directive \
184 && rm -f $$ofile.directive
189 XDELTA_OPTIONS = --pristine -9
192 delta-xdelta: prev-tarball new-tarball got-xdelta
193 ## Generate the delta file (xdelta has wierd exit statuses, so we need to
194 ## add some shell code to keep make happy), and then generate the signatures
195 ## for FSF ftp-upload:
196 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
197 ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
198 $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
201 && $(GPG) --detach-sign $$ofile \
202 && echo "directory: libtool" > $$ofile.directive \
203 && $(GPG) --clearsign $$ofile.directive \
204 && rm -f $$ofile.directive
208 @$(LN_S) $(top_srcdir)/doc/libtool.texi doc/manual.texi
209 $(TEXI2HTML) -I doc -monolithic -number -verbose doc/manual.texi
210 @mv doc/manual.html manual.html
211 @rm -f doc/manual.texi