* libltdl/loaders/preopen.c: Don't allow lt_dlopen if the
[libtool.git] / Makefile.maint
blobe4ae4e0944caffddea13ae08209ff45f51f21cf0
1 ## Makefile.maint -- Makefile rules for libtool maintainers -*-Makefile-*-
2 ##
3 ## Copyright (C) 2004, 2005 Free Software Foundation
4 ##
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.
9 ##
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
22 include Makefile
23 Makefile:
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."
30         @exit 1
32 TEXI2HTML = texi2html
34 $(srcdir)/commit: $(srcdir)/$(auxdir)/mailnotify clcommit.m4sh
35         $(timestamp); \
36         cd $(srcdir); \
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; \
44         rm -f commit.in
46 $(srcdir)/$(auxdir)/mailnotify: $(auxdir)/mailnotify.m4sh
47         $(timestamp); \
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; \
57         rm -f mailnotify.in
59 .PHONY: cvs-release
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."
72 .PHONY: version-check
73 version-check:
74         @case $(VERSION) in \
75         *[acegikmoqsuwy]) \
76           echo "Version \`$(VERSION)' is not a releasable version, please read:"; \
77           echo "    http://www.gnu.org/software/libtool/contribute.html"; \
78           exit 1; \
79           ;; \
80         esac
82 .PHONY: prev-tarball
83 prev-tarball:
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
92 TSDEPS =
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
98 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
104 .PHONY: cvs-news
105 cvs-news:
106 ## Make sure the NEWS file is up-to-date:
107         @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
108         then :; \
109         else \
110           echo "NEWS not updated; not releasing" 1>&2; \
111           exit 1; \
112         fi
114 ## Program to use to fetch files.
115 WGET = wget
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
120 FETCHFILES = \
121 ./INSTALL \
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.
128 .PHONY: fetch
129 fetch:
130         rm -rf Fetchdir > /dev/null 2>&1
131         mkdir Fetchdir
132 ## If a get fails then that is a problem.
133         (cd Fetchdir && \
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
140 ## possible.
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 :; \
145           else \
146             stat=1; \
147             echo "Updating $(srcdir)/$$file..."; \
148             cp $$fetchedfile $(srcdir)/$$file; \
149           fi; \
150         done; \
151         test $$stat = 1 && \
152           echo "See Fetchdir/update.patch for a log of the changes."; \
153         exit $$stat
156 GPG = gpg # set it to `:' to avoid gpg operations
158 .PHONY: cvs-commit
159 cvs-commit: cvs-news
160         cd $(srcdir) && $(SHELL) ./commit
162 .PHONY: cvs-dist
163 cvs-dist: cvs-news timestamps
164 ## Build the distribution:
165         $(MAKE) distcheck
166 ## Finally, if everything was successful, tag the release
167         cd $(srcdir) \
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; \
176         done
178 .PHONY: new-tarball
179 new-tarball:
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
185 .PHONY: got-xdelta
186 got-xdelta:
187 ## Make sure xdelta exists;
188         @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
189         then :;\
190         else \
191           echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
192           exit 1; \
193         fi
195 .PHONY: deltas
196 deltas: delta-diff delta-xdelta
198 DIFF = diff
199 DIFF_OPTIONS = -ruNp
201 .PHONY: delta-diff
202 delta-diff: prev-tarball new-tarball
203 ## Unpack the tarballs somewhere to diff them
204         rm -rf delta-diff
205         mkdir delta-diff
207         ofile="../$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
208         cd delta-diff \
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
219         rm -rf delta-diff
221 XDELTA = xdelta
222 XDELTA_OPTIONS = -9
224 .PHONY: delta-xdelta
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 \
232             $$ofile 2>&1` \
233           && : ) \
234         && $(GPG) --detach-sign $$ofile \
235         && echo "directory: libtool" > $$ofile.directive \
236         && $(GPG) --clearsign $$ofile.directive \
237         && rm -f $$ofile.directive
239 .PHONY: web-manual
240 web-manual:
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