mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
205 lines
6.8 KiB
Makefile
205 lines
6.8 KiB
Makefile
## Makefile.am -- Process this file with automake to produce Makefile.in
|
|
##
|
|
## Copyright (C) 2003 Free Software Foundation
|
|
##
|
|
## This program is free software; you can redistribute it and/or modify
|
|
## it under the terms of the GNU General Public License as published by
|
|
## the Free Software Foundation; either version 2 of the License, or
|
|
## (at your option) any later version.
|
|
##
|
|
## This program is distributed in the hope that it will be useful,
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
## GNU General Public License for more details.
|
|
##
|
|
## You should have received a copy of the GNU General Public License
|
|
## along with this program; see the file COPYING. If not, write to
|
|
## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
## Boston, MA 02111-1307, USA.
|
|
|
|
AUTOMAKE_OPTIONS = 1.7 gnu
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
BUILD_SUBDIRS = . libltdl doc tests
|
|
SUBDIRS = $(BUILD_SUBDIRS)
|
|
DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS)
|
|
|
|
aclocal_macros = m4/libtool.m4 m4/ltdl.m4
|
|
|
|
EXTRA_DIST = $(aclocal_macros) bootstrap libtoolize.in ltmain.in \
|
|
config/mkstamp ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
|
|
ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 ChangeLog.2002
|
|
CLEANFILES = libtool libtoolize ltmain.shT
|
|
|
|
# These are required by libtoolize.
|
|
pkgdata_SCRIPTS = config/config.guess config/config.sub
|
|
pkgdata_DATA = config/ltmain.sh
|
|
|
|
# This macro file should be visible to Automake's aclocal.
|
|
aclocal_DATA = $(aclocal_macros)
|
|
|
|
# The standalone libtool script, and the libtool distributor.
|
|
bin_SCRIPTS = libtool libtoolize
|
|
|
|
config_status = $(top_builddir)/config.status
|
|
|
|
libtool: config/ltmain.sh $(top_builddir)/configure
|
|
CONFIG_FILES= CONFIG_HEADERS= $(SHELL) $(config_status)
|
|
chmod +x $@
|
|
|
|
libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
|
|
CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_COMMANDS= $(SHELL) $(config_status)
|
|
chmod +x $@
|
|
|
|
# TSDEPS will be defined to TSDEPS_DIST at `make dist' time
|
|
TSDEPS =
|
|
TSDEPS_DIST = ChangeLog m4/libtool.m4
|
|
CVS = cvs # set it to `:' to avoid CVS operations
|
|
|
|
.PHONY: timestamps update-timestamps
|
|
timestamps distdir: update-timestamps
|
|
update-timestamps:
|
|
@if (cd $(srcdir) && test -d CVS && \
|
|
$(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \
|
|
echo "Cannot make dist before commit"; exit 1; else :; fi
|
|
|
|
.PHONY: configure-subdirs
|
|
configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
|
|
@DIST_MAKEFILE_LIST@:
|
|
dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \
|
|
test -d $$dir || mkdir $$dir || exit 1; \
|
|
abs_srcdir=`cd $(top_srcdir) && pwd`; \
|
|
(cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
|
|
|
|
# Don't install over the top of an old pkgdatadir
|
|
install-data-local:
|
|
-rm -rf $(DESTDIR)$(pkgdatadir)
|
|
|
|
# Create and install libltdl
|
|
install-data-hook:
|
|
cd libltdl && $(MAKE) local-install-files
|
|
|
|
# Uninstall libltdl
|
|
uninstall-local:
|
|
-rm -rf $(DESTDIR)$(pkgdatadir)/libltdl
|
|
|
|
################################################################
|
|
##
|
|
## Everything past here is useful to the maintainer, but probably not
|
|
## to anybody else (snarfed from automake/Makefile.am).
|
|
##
|
|
|
|
XDELTA = xdelta
|
|
XDELTA_OPTIONS = --pristine -9
|
|
|
|
GPG = gpg # set it to `:' to avoid gpg operations
|
|
|
|
.PHONY: cvs-dist cvs-diff xdelta cvs-release
|
|
cvs-dist:
|
|
## Make sure the NEWS file is up-to-date:
|
|
@if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" >/dev/null; \
|
|
then :; \
|
|
else \
|
|
echo "NEWS not updated; not releasing" 1>&2; \
|
|
exit 1; \
|
|
fi
|
|
## Build the distribution:
|
|
$(MAKE) distcheck
|
|
## Finally, if everything was successful, commit the last changes and tag
|
|
## the release in the repository:
|
|
cd $(srcdir) \
|
|
&& $(SHELL) ./commit \
|
|
&& $(CVS) -q tag -c `echo "Release-$(VERSION)" | sed 's/\./-/g'`
|
|
## We do want the timestamped version numbers from the CVS keywords in
|
|
## ChangeLog to be correct, so we must rebuild the release tarball after
|
|
## a successfull commit, and then generate the signatures needed for
|
|
## FSF ftp-upload:
|
|
ofile="$(PACKAGE)-$(VERSION).tar.gz"; \
|
|
$(MAKE) dist \
|
|
&& $(GPG) --detach-sign $$ofile \
|
|
&& echo "directory: libtool" > $$ofile.directive \
|
|
&& $(GPG) --clearsign $$ofile.directive \
|
|
&& rm -f $$ofile.directive
|
|
|
|
cvs-diff:
|
|
## Figure out which cvs tags we are diffing, and if the diff works we
|
|
## compress it and then generate the signatures needed for FSF ftp-upload:
|
|
thisver=`echo "release-$(VERSION)" | sed 's/\./-/g'`; \
|
|
if test -z "$$OLDVERSION"; then \
|
|
prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
|
|
else prevno="$$OLDVERSION"; fi; \
|
|
prevver=release-`echo $$prevno | sed 's/\./-/g'`; \
|
|
ofile="$(PACKAGE)-$$prevno-$(VERSION).diff.gz"; \
|
|
$(CVS) -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
|
|
| GZIP=$(GZIP_ENV) gzip -c > $$ofile; \
|
|
&& $(GPG) --detach-sign $$ofile \
|
|
&& echo "directory: libtool" > $$ofile.directive \
|
|
&& $(GPG) --clearsign $$ofile.directive \
|
|
&& rm -f $$ofile.directive
|
|
|
|
xdelta:
|
|
## Make sure xdelta exists;
|
|
@if ($(XDELTA) --version 2>&1 | grep version)>/dev/null 2>/dev/null; \
|
|
then :;\
|
|
else \
|
|
echo "Get xdelta from http://sourceforge.net/projects/xdelta."; \
|
|
exit 1; \
|
|
fi
|
|
## Generate the delta file (xdelta has wierd exit statuses, so we need to
|
|
## add some shell code to keep make happy), and then generate the signatures
|
|
## for FSF ftp-upload:
|
|
if test -z "$$OLDVERSION"; then \
|
|
prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
|
|
else prevno="$$OLDVERSION"; fi; \
|
|
ofile="$(PACKAGE)-$$prevno-$(VERSION).xdelta"; \
|
|
( test -z `$(XDELTA) delta $(XDELTA_OPTIONS) \
|
|
$(PACKAGE)-$$prevno.tar.gz $(PACKAGE)-$(VERSION).tar.gz \
|
|
$$ofile 2>&1` \
|
|
&& : ) \
|
|
&& $(GPG) --detach-sign $$ofile \
|
|
&& echo "directory: libtool" > $$ofile.directive \
|
|
&& $(GPG) --clearsign $$ofile.directive \
|
|
&& rm -f $$ofile.directive
|
|
|
|
cvs-release: cvs-dist cvs-diff xdelta
|
|
|
|
## Program to use to fetch files.
|
|
WGET = wget
|
|
WGETSGO = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
|
|
|
## Files that we fetch and which we compare against.
|
|
## FIXME should be a lot more here
|
|
FETCHFILES = \
|
|
./INSTALL \
|
|
config/config.guess \
|
|
libltdl/config.guess \
|
|
config/config.sub \
|
|
libltdl/config.sub \
|
|
config/texinfo.tex
|
|
|
|
## Fetch the latest versions of files we care about.
|
|
fetch:
|
|
rm -rf Fetchdir > /dev/null 2>&1
|
|
mkdir Fetchdir
|
|
## If a get fails then that is a problem.
|
|
(cd Fetchdir && \
|
|
$(WGETSGO)/autoconf/autoconf/INSTALL; \
|
|
$(WGETSGO)/config/config/config.guess; \
|
|
$(WGETSGO)/config/config/config.sub; \
|
|
$(WGETSGO)/texinfo/texinfo/doc/texinfo.tex )
|
|
## Don't exit after test because we want to give as many errors as
|
|
## possible.
|
|
@stat=0; for file in $(FETCHFILES); do \
|
|
fetchedfile=Fetchdir/`echo $$file | sed 's,.*/,,g'`; \
|
|
if diff -u $(srcdir)/$$file $$fetchedfile \
|
|
>>Fetchdir/update.patch 2>/dev/null; then :; \
|
|
else \
|
|
stat=1; \
|
|
echo "Updating $(srcdir)/$$file..."; \
|
|
cp $$fetchedfile $(srcdir)/$$file; \
|
|
fi; \
|
|
done; \
|
|
test $$stat = 1 && \
|
|
echo "See Fetchdir/update.patch for a log of the changes."; \
|
|
exit $$stat
|