1 ## Makefile.am -- Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2003 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 AUTOMAKE_OPTIONS = 1.7 gnu
21 ACLOCAL_AMFLAGS = -I m4
23 BUILD_SUBDIRS = . libltdl doc tests
24 SUBDIRS = $(BUILD_SUBDIRS)
25 DIST_SUBDIRS = $(BUILD_SUBDIRS)
27 aclocal_macros = m4/libtool.m4 m4/ltdl.m4
29 EXTRA_DIST = $(aclocal_macros) bootstrap libtoolize.in ltmain.in \
30 config/mkstamp ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
31 ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 ChangeLog.2002
32 CLEANFILES = libtool libtoolize ltmain.shT
34 # These are required by libtoolize.
35 pkgdata_SCRIPTS = config/config.guess config/config.sub
36 pkgdata_DATA = config/ltmain.sh
38 # This macro file should be visible to Automake's aclocal.
39 aclocal_DATA = $(aclocal_macros)
41 # The standalone libtool script, and the libtool distributor.
42 bin_SCRIPTS = libtool libtoolize
44 config_status = $(top_builddir)/config.status
46 libtool: config/ltmain.sh $(top_builddir)/configure
47 CONFIG_FILES= CONFIG_HEADERS= CONFIG_COMMANDS=$@ $(SHELL) $(config_status)
50 libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
51 CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_COMMANDS= $(SHELL) $(config_status)
54 .PHONY: configure-subdirs
55 configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
57 dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \
58 test -d $$dir || mkdir $$dir || exit 1; \
59 abs_srcdir=`cd $(top_srcdir) && pwd`; \
60 (cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
62 # Don't install over the top of an old pkgdatadir
64 -rm -rf $(DESTDIR)$(pkgdatadir)
66 # Create and install libltdl
68 cd libltdl && $(MAKE) local-install-files
72 -rm -rf $(DESTDIR)$(pkgdatadir)/libltdl
75 ## ---------------------------------------------------------------- ##
76 ## Everything past here is useful to the maintainer, but probably ##
77 ## not to anybody else (inspiration from automake/Makefile.am). ##
78 ## ---------------------------------------------------------------- ##
80 CHECK_LASTRELEASE = if test -z "$(LASTRELEASE)"; \
81 then echo "LASTRELEASE is not set"; exit 1; fi
84 cvs-release: version-check prev-tarball cvs-news fetch cvs-dist cvs-diff xdelta
85 @$(CHECK_LASTRELEASE); tarname="$(PACKAGE)-$(VERSION).tar.gz"; \
86 diffname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
87 xdeltaname="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
88 echo " *** Upload $$tarname, $$tarname.sig,";\
89 echo " *** $$tarname.directive.asc, $$diffname,"; \
90 echo " *** $$diffname.sig, $$diffname.directive.asc,"; \
91 echo " *** $$xdeltaname, $$xdeltaname.sig and";\
92 echo " *** $$xdeltaname.directive.asc to either";\
93 echo " *** /incoming/alpha or /incoming/ftp on ftp-upload.gnu.org.";
99 echo "Version \`$(VERSION)' is not a releasable version, please read:"; \
100 echo " http://www.gnu.org/software/libtool/contribute.html"; \
107 ## Make sure we have the previous release tarball in the tree.
108 @$(CHECK_LASTRELEASE); ofile="$(PACKAGE)-$(LASTRELEASE).tar.gz"; \
109 if test -f $$ofile; then :; \
110 else echo "Cannot make xdelta without $$ofile"; exit 1; fi
112 # TSDEPS will be defined to TSDEPS_DIST at `make dist' time
114 TSDEPS_DIST = ChangeLog m4/libtool.m4
115 CVS = cvs # set it to `:' to avoid CVS operations
117 .PHONY: timestamps update-timestamps
118 timestamps: update-timestamps
120 @if (cd $(srcdir) && test -d CVS && \
121 $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \
122 echo "Cannot make cvs-dist before commit"; exit 1; else :; fi
127 ## Make sure the NEWS file is up-to-date:
128 @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
131 echo "NEWS not updated; not releasing" 1>&2; \
135 ## Program to use to fetch files.
137 WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
139 ## Files that we fetch and which we compare against.
140 ## FIXME should be a lot more here
143 config/config.guess \
144 libltdl/config.guess \
149 ## Fetch the latest versions of files we care about.
152 rm -rf Fetchdir > /dev/null 2>&1
154 ## If a get fails then that is a problem.
156 $(WGETSGO)/autoconf/autoconf/INSTALL; \
157 $(WGETSGO)/config/config/config.guess; \
158 $(WGETSGO)/config/config/config.sub; \
159 $(WGETSGO)/texinfo/texinfo/doc/texinfo.tex )
160 ## Don't exit after test because we want to give as many errors as
162 @stat=0; for file in $(FETCHFILES); do \
163 fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
164 if diff -u $(srcdir)/$$file $$fetchedfile \
165 >>Fetchdir/update.patch 2>/dev/null; then :; \
168 echo "Updating $(srcdir)/$$file..."; \
169 cp $$fetchedfile $(srcdir)/$$file; \
173 echo "See Fetchdir/update.patch for a log of the changes."; \
177 GPG = gpg # set it to `:' to avoid gpg operations
181 ## Build the distribution:
183 ## Finally, if everything was successful, commit the last changes and tag
184 ## the release in the repository:
186 && $(SHELL) ./commit \
187 && $(CVS) -q tag -c `echo "Release-$(VERSION)" | sed 's/\./-/g'`
188 ## We do want the timestamped version numbers from the CVS keywords in
189 ## ChangeLog to be correct, so we must rebuild the release tarball after
190 ## a successfull commit, and then generate the signatures needed for
192 ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
194 && $(GPG) --detach-sign $$ofile \
195 && echo "directory: libtool" > $$ofile.directive \
196 && $(GPG) --clearsign $$ofile.directive \
197 && rm -f $$ofile.directive
201 ## Figure out which cvs tags we are diffing, and if the diff works we
202 ## compress it and then generate the signatures needed for FSF ftp-upload:
203 thisver=`echo "release-$(VERSION)" | sed 's/\./-/g'`; \
204 $(CHECK_LASTRELEASE); \
205 prevver=release-`echo $(LASTRELEASE) | sed 's/\./-/g'`; \
206 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).diff.gz"; \
207 $(CVS) -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
208 | GZIP=$(GZIP_ENV) gzip -c > $$ofile \
209 && $(GPG) --detach-sign $$ofile \
210 && echo "directory: libtool" > $$ofile.directive \
211 && $(GPG) --clearsign $$ofile.directive \
212 && rm -f $$ofile.directive
215 XDELTA_OPTIONS = --pristine -9
219 ## Make sure xdelta exists;
220 @if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
223 echo "Get xdelta from http://sourceforge.net/projects/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 $(CHECK_LASTRELEASE); \
230 ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
231 ( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
232 $(PACKAGE)-$(LASTRELEASE).tar.gz $(PACKAGE)-$(VERSION).tar.gz \
235 && $(GPG) --detach-sign $$ofile \
236 && echo "directory: libtool" > $$ofile.directive \
237 && $(GPG) --clearsign $$ofile.directive \
238 && rm -f $$ofile.directive