1 ## Makefile.maint -- Makefile rules for libtool maintainers -*-Makefile-*-
3 ## Copyright (C) 2004, 2005 Free Software Foundation, Inc.
4 ## Written by Scott James Remnant, 2004
6 ## This file is part of GNU Libtool.
8 ## GNU Libtool is free software; you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation; either version 2 of the License, or
11 ## (at your option) any later version.
13 ## GNU Libtool is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with GNU Libtool; see the file COPYING. If not, a copy
20 ## can be downloaded from http://www.gnu.org/licenses/gpl.html,
21 ## or obtained by writing to the Free ## Software Foundation, Inc.,
22 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 # Need various variables defined by configure, a lot easier to just
26 # include the Makefile than figure out a way to put them in here too
29 @echo " *** Run maintainer rules from the build tree, with"
30 @echo " *** \`make -f../Makefile.maint' for example, where"
31 @echo " *** \`../' is the relative path back to the directory"
32 @echo " *** that contains the \`Makefile.maint'. Alternatively,"
33 @echo " *** run \`./configure' in the source tree for an in"
34 @echo " *** tree build."
39 $(srcdir)/commit: $(srcdir)/$(auxdir)/mailnotify clcommit.m4sh
42 rm -f commit commit.in commit.tmp; \
43 $(M4SH) -B $(auxdir) clcommit.m4sh > commit.in; \
44 input="clcommit.m4sh"; \
45 $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" commit.in > commit.tmp; \
46 chmod a+x commit.tmp; \
47 chmod a-w commit.tmp; \
48 mv -f commit.tmp commit; \
51 $(srcdir)/$(auxdir)/mailnotify: $(auxdir)/mailnotify.m4sh
53 cd $(srcdir)/$(auxdir); \
54 rm -f mailnotify mailnotify.in mailnotify.tmp; \
55 $(M4SH) -B . mailnotify.m4sh > mailnotify.in; \
56 input="mailnotify.m4sh"; \
57 $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
58 mailnotify.in > mailnotify.tmp; \
59 chmod a+x mailnotify.tmp; \
60 chmod a-w mailnotify.tmp; \
61 mv -f mailnotify.tmp mailnotify; \
65 cvs-release: version-check prev-tarball cvs-news fetch cvs-commit cvs-dist deltas web-manual
66 @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
67 diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
68 xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
69 echo " *** Upload $$tarname, $$tarname.sig,";\
70 echo " *** $$tarname.directive.asc, $$diffname,"; \
71 echo " *** $$diffname.sig, $$diffname.directive.asc,"; \
72 echo " *** $$xdeltaname, $$xdeltaname.sig and";\
73 echo " *** $$xdeltaname.directive.asc to either"
74 echo " *** /incoming/alpha or /incoming/ftp on ftp-upload.gnu.org."
75 echo " *** You might need to upload manual.html to webcvs/libtool."
81 echo "Version \`$(VERSION)' is not a releasable version, please read:"; \
82 echo " http://www.gnu.org/software/libtool/contribute.html"; \
89 ## Make sure we have the previous release tarball in the tree.
90 @if test -z "$(LASTRELEASE)"; \
91 then echo "LASTRELEASE is not set"; exit 1; fi
92 @ofile="$(PACKAGE)-$(LASTRELEASE).tar.gz"; \
93 if test -f $$ofile; then :; \
94 else echo "Cannot make deltas without $$ofile"; exit 1; fi
96 TSDEPS = ChangeLog libltdl/m4/libtool.m4
97 CVS = cvs # set it to `:' to avoid CVS operations
99 .PHONY: timestamps update-timestamps
100 timestamps: update-timestamps
102 @if (cd $(srcdir) && test -d CVS && \
103 $(CVS) -n update $(TSDEPS) | grep '^M'); then \
104 echo "Cannot make cvs-dist before commit"; exit 1; else :; fi
109 ## Make sure the NEWS file is up-to-date:
110 @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
113 echo "NEWS not updated; not releasing" 1>&2; \
117 ## Program to use to fetch files.
119 WGETSGO = $(WGET) 'http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~'
120 WGET_GIT = $(WGET) 'http://git.savannah.gnu.org/gitweb/?a=blob_plain;hb=HEAD;p='
122 ## Files that we fetch and which we compare against.
123 ## FIXME should be a lot more here
126 $(auxdir)/install-sh \
127 $(auxdir)/config.guess \
128 $(auxdir)/config.sub \
129 $(auxdir)/texinfo.tex
131 ## Fetch the latest versions of files we care about.
134 rm -rf Fetchdir > /dev/null 2>&1
136 ## If a get fails then that is a problem.
138 $(WGET_GIT)'gnulib.git;f=doc/INSTALL' -O INSTALL && \
139 $(WGET_GIT)'automake.git;f=lib/install-sh' -O install-sh && \
140 $(WGETSGO)/config/config/config.guess -O config.guess && \
141 $(WGETSGO)/config/config/config.sub -O config.sub && \
142 $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex -O texinfo.tex )
143 ## Don't exit after test because we want to give as many errors as
145 @stat=0; for file in $(FETCHFILES); do \
146 fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
147 if diff -u $(srcdir)/$$file $$fetchedfile \
148 >>Fetchdir/update.patch 2>/dev/null; then :; \
151 echo "Updating $(srcdir)/$$file..."; \
152 cp $$fetchedfile $(srcdir)/$$file; \
156 echo "See Fetchdir/update.patch for a log of the changes."; \
160 GPG = gpg # set it to `:' to avoid gpg operations
164 cd $(srcdir) && $(SHELL) ./commit
167 cvs-dist: cvs-news timestamps
168 ## Build the distribution:
170 ## Finally, if everything was successful, tag the release
172 && $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./-/g'`
173 ## Generate signatures and directives for FSF ftp-upload:
174 for suffix in gz bz2; do \
175 ofile="$(PACKAGE)-$(VERSION).tar.$$suffix"; \
176 $(GPG) --detach-sign $$ofile \
177 && echo "directory: libtool" > $$ofile.directive \
178 && $(GPG) --clearsign $$ofile.directive \
179 && rm -f $$ofile.directive; \
184 ## Make sure we have the new release tarball in the tree.
185 @ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
186 if test -f $$ofile; then :; \
187 else echo "Cannot make deltas without $$ofile"; exit 1; fi
191 ## Make sure xdelta exists;
192 @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
195 echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
200 deltas: delta-diff delta-xdelta
206 delta-diff: prev-tarball new-tarball
207 ## Unpack the tarballs somewhere to diff them
211 ofile="../$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
213 && tar xzf "../$(PACKAGE)-$(LASTRELEASE).tar.gz" \
214 && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \
215 && $(DIFF) $(DIFF_OPTIONS) \
216 $(PACKAGE)-$(LASTRELEASE) $(PACKAGE)-$(VERSION) \
217 | GZIP=$(GZIP_ENV) gzip -c > $$ofile \
218 && $(GPG) --detach-sign $$ofile \
219 && echo "directory: libtool" > $$ofile.directive \
220 && $(GPG) --clearsign $$ofile.directive \
221 && rm -f $$ofile.directive
229 delta-xdelta: prev-tarball new-tarball got-xdelta
230 ## Generate the delta file (xdelta has wierd exit statuses, so we need to
231 ## add some shell code to keep make happy), and then generate the signatures
232 ## for FSF ftp-upload:
233 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
234 ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
235 $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
238 && $(GPG) --detach-sign $$ofile \
239 && echo "directory: libtool" > $$ofile.directive \
240 && $(GPG) --clearsign $$ofile.directive \
241 && rm -f $$ofile.directive
245 @rm -f doc/manual.texi manual.html
246 @$(LN_S) $(abs_srcdir)/doc/libtool.texi doc/manual.texi
247 $(TEXI2HTML) -I doc -I $(srcdir)/doc -monolithic -number -verbose doc/manual.texi
248 @test -f manual.html || mv doc/manual.html manual.html
249 @rm -f doc/manual.texi