libtool/Makefile.am
Alexandre Oliva 9b2ff91e8e * Makefile.am (ltconfig, ltmain.sh): some broken makes don't like
macros in targets; replace $(srcdir) with @srcdir@
* configure.in (ACINCLUDE_M4_LIST): same problem; expand $srcdir
1999-01-27 06:23:47 +00:00

134 lines
5.0 KiB
Makefile

## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
AUTOMAKE_OPTIONS = 1.3e gnits readme-alpha
BUILD_SUBDIRS = . doc tests
SUBDIRS = $(BUILD_SUBDIRS)
DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS)
# We need to export these variables when we run ltconfig.
CFLAGS = @CFLAGS@
CPPLAGS = @CPPFLAGS@
aclocal_macros = libtool.m4
EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \
libtool.spec
CLEANFILES = libtool libtoolize ltconfig.T ltmain.shT libltdl.tar.gz
# These are required by libtoolize.
pkgdata_SCRIPTS = config.guess config.sub ltconfig
pkgdata_DATA = 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
libtool: $(srcdir)/ltmain.sh $(srcdir)/ltconfig
CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
LD="$(LD)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
$(SHELL) $(srcdir)/ltconfig --srcdir=$(srcdir) --output=$@ \
$(srcdir)/ltmain.sh
# Experimental C version of libtool.
clibtool: $(srcdir)/ltmain.c $(srcdir)/ltconfig
CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
LD="$(LD)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
$(SHELL) $(srcdir)/ltconfig --srcdir=$(srcdir) --output=$@ \
$(srcdir)/ltmain.c
libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
chmod +x libtoolize
# TSDEPS will be defined to TSDEPS_DIST at `make dist' time
TSDEPS =
TSDEPS_DIST = ChangeLog libtool.m4
.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
$(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh
# Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP.
# Line numbering transliterated from a section in autoconf (Autoconf 2.12).
@srcdir@/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS)
rm -f ltconfig.T
date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
$(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-e "s%@""TIMESTAMP@%$$date%" \
-e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \
> ltconfig.T
chmod +x ltconfig.T
mv -f ltconfig.T $@ || \
(rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T)
@srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS)
rm -f ltmain.shT
date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT
mv -f ltmain.shT $@ || \
(rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
# All our rules should depend on these demo files.
all-local check-local: $(ACINCLUDE_M4_LIST) libtool
check-local: libltdl/Makefile
@ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4
rm -f $@
cp $(srcdir)/libtool.m4 $@
.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
# Create and install libltdl.tar.gz
install-data-hook: libltdl/Makefile
@echo 'cd libltdl && $(MAKE) distdir distdir=libltdl && tar -cf libltdl.tar libltdl && gzip $(GZIP_ENV) libltdl.tar'
@if (cd libltdl && $(MAKE) distdir distdir=libltdl && \
tar -cf libltdl.tar libltdl && \
gzip $(GZIP_ENV) libltdl.tar); then \
echo "$(INSTALL_DATA) libltdl/libltdl.tar.gz $(pkgdatadir)/libltdl.tar.gz"; \
$(INSTALL_DATA) libltdl/libltdl.tar.gz $(pkgdatadir)/libltdl.tar.gz; \
else \
echo "Warning: without gzip, libtool cannot install libltdl.tar.gz"; \
fi; \
rm -rf libltdl/libltdl libltdl/libltdl.tar libltdl/libltdl.tar.gz
################################################################
##
## Everything past here is useful to the maintainer, but probably not
## to anybody else (snarfed from automake/Makefile.am).
##
# Tag before making distribution. Also, don't make a distribution if
# checks fail. Also, make sure the NEWS file is up-to-date.
cvs-dist: distcheck
@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
cd $(srcdir) && cvs -q tag `echo "release-$(VERSION)" | sed 's/\./-/g'`
$(MAKE) dist
cvs-diff:
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'`; \
cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
> $(PACKAGE)-$$prevno-$(VERSION).diff