1 ## Makefile.maint -- Makefile rules for libtool maintainers -*-Makefile-*-
3 ## Copyright (C) 2004, 2005 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.
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."
34 $(srcdir)/commit: $(srcdir)/$(auxdir)/mailnotify clcommit.m4sh
37 rm -f commit commit.in commit.tmp; \
38 $(M4SH) -B $(auxdir) clcommit.m4sh > commit.in; \
39 input="clcommit.m4sh"; \
40 $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" commit.in > commit.tmp; \
41 chmod a+x commit.tmp; \
42 chmod a-w commit.tmp; \
43 mv -f commit.tmp commit; \
46 $(srcdir)/$(auxdir)/mailnotify: $(auxdir)/mailnotify.m4sh
48 cd $(srcdir)/$(auxdir); \
49 rm -f mailnotify mailnotify.in mailnotify.tmp; \
50 $(M4SH) -B . mailnotify.m4sh > mailnotify.in; \
51 input="mailnotify.m4sh"; \
52 $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
53 mailnotify.in > mailnotify.tmp; \
54 chmod a+x mailnotify.tmp; \
55 chmod a-w mailnotify.tmp; \
56 mv -f mailnotify.tmp mailnotify; \
60 cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist deltas web-manual
61 @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
62 diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
63 xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
64 echo " *** Upload $$tarname, $$tarname.sig,";\
65 echo " *** $$tarname.directive.asc, $$diffname,"; \
66 echo " *** $$diffname.sig, $$diffname.directive.asc,"; \
67 echo " *** $$xdeltaname, $$xdeltaname.sig and";\
68 echo " *** $$xdeltaname.directive.asc to either"
69 echo " *** /incoming/alpha or /incoming/ftp on ftp-upload.gnu.org."
70 echo " *** You might need to upload manual.html to webcvs/libtool."
76 echo "Version \`$(VERSION)' is not a releasable version, please read:"; \
77 echo " http://www.gnu.org/software/libtool/contribute.html"; \
84 ## Make sure we have the previous release tarball in the tree.
85 @if test -z "$(LASTRELEASE)"; \
86 then echo "LASTRELEASE is not set"; exit 1; fi
87 @ofile="$(PACKAGE)-$(LASTRELEASE).tar.gz"; \
88 if test -f $$ofile; then :; \
89 else echo "Cannot make deltas without $$ofile"; exit 1; fi
91 # TSDEPS will be defined to TSDEPS_DIST at `make dist' time
93 TSDEPS_DIST = ChangeLog m4/libtool.m4
94 CVS = cvs # set it to `:' to avoid CVS operations
96 .PHONY: timestamps update-timestamps
97 timestamps: update-timestamps
99 @if (cd $(srcdir) && test -d CVS && \
100 $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \
101 echo "Cannot make cvs-dist before commit"; exit 1; else :; fi
106 ## Make sure the NEWS file is up-to-date:
107 @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
110 echo "NEWS not updated; not releasing" 1>&2; \
114 ## Program to use to fetch files.
116 WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
118 ## Files that we fetch and which we compare against.
119 ## FIXME should be a lot more here
122 $(auxdir)/install-sh \
123 $(auxdir)/config.guess \
124 $(auxdir)/config.sub \
125 $(auxdir)/texinfo.tex
127 ## Fetch the latest versions of files we care about.
130 rm -rf Fetchdir > /dev/null 2>&1
132 ## If a get fails then that is a problem.
134 $(WGETSGO)/autoconf/autoconf/INSTALL; \
135 $(WGETSGO)/automake/automake/lib/install-sh; \
136 $(WGETSGO)/config/config/config.guess; \
137 $(WGETSGO)/config/config/config.sub; \
138 $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex )
139 ## Don't exit after test because we want to give as many errors as
141 @stat=0; for file in $(FETCHFILES); do \
142 fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
143 if diff -u $(srcdir)/$$file $$fetchedfile \
144 >>Fetchdir/update.patch 2>/dev/null; then :; \
147 echo "Updating $(srcdir)/$$file..."; \
148 cp $$fetchedfile $(srcdir)/$$file; \
152 echo "See Fetchdir/update.patch for a log of the changes."; \
156 GPG = gpg # set it to `:' to avoid gpg operations
160 cd $(srcdir) && $(SHELL) ./commit
163 cvs-dist: cvs-news timestamps
164 ## Build the distribution:
166 ## Finally, if everything was successful, tag the release
168 && $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./-/g'`
169 ## Generate signatures and directives for FSF ftp-upload:
170 for suffix in .gz .bz2; do \
171 ofile="$(PACKAGE)-$(VERSION).tar.$$suffix"; \
172 $(GPG) --detach-sign $$ofile \
173 && echo "directory: libtool" > $$ofile.directive \
174 && $(GPG) --clearsign $$ofile.directive \
175 && rm -f $$ofile.directive; \
180 ## Make sure we have the new release tarball in the tree.
181 @ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
182 if test -f $$ofile; then :; \
183 else echo "Cannot make deltas without $$ofile"; exit 1; fi
187 ## Make sure xdelta exists;
188 @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
191 echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
196 deltas: delta-diff delta-xdelta
202 delta-diff: prev-tarball new-tarball
203 ## Unpack the tarballs somewhere to diff them
207 ofile="../$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
209 && tar xzf "../$(PACKAGE)-$(LASTRELEASE).tar.gz" \
210 && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
211 && $(DIFF) $(DIFF_OPTIONS) \
212 $(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
213 | GZIP=$(GZIP_ENV) gzip -c > $$ofile \
214 && $(GPG) --detach-sign $$ofile \
215 && echo "directory: libtool" > $$ofile.directive \
216 && $(GPG) --clearsign $$ofile.directive \
217 && rm -f $$ofile.directive
225 delta-xdelta: prev-tarball new-tarball got-xdelta
226 ## Generate the delta file (xdelta has wierd exit statuses, so we need to
227 ## add some shell code to keep make happy), and then generate the signatures
228 ## for FSF ftp-upload:
229 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
230 ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
231 $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
234 && $(GPG) --detach-sign $$ofile \
235 && echo "directory: libtool" > $$ofile.directive \
236 && $(GPG) --clearsign $$ofile.directive \
237 && rm -f $$ofile.directive
241 @rm -f doc/manual.texi manual.html
242 @$(LN_S) $(abs_srcdir)/doc/libtool.texi doc/manual.texi
243 $(TEXI2HTML) -I doc -I $(srcdir)/doc -monolithic -number -verbose doc/manual.texi
244 @test -f manual.html || mv doc/manual.html manual.html
245 @rm -f doc/manual.texi