mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-12-27 07:09:26 +08:00
0e072fa33e
at the top ofltconfig.in is ugly, but will go away when the rest of ltconfig is migrated. * Makefile.am (libtool): Pass the value of $ECHO to ltconfig as an environment variable. * libtool.m4 (_LT_AC_PROG_ECHO_BACKSLASH): Quote the ECHO value correctly so that it inserts the correct code into configure.in suitably quoted for M4 expansion. This code needs to be near the top of configure.in as it calls itself recursively, so I am using AC_DIVERSION_NOTICE (or simply NOTICE on CVS Autoconf). The value of ECHO is also substitued into the Makefile to be used when Make calls ltconfig to generate libtool, so another layer of quotation is required for the Makefile. (AC_LIBTOOL_SETUP): Use it. * ltconfig.in: Accept a value for ECHO from the environment, and carefully substitue for $0 if it is present in the ECHO value. Because ECHO was quoted for Make, when ltconfig is called by configure, it is overquoted, and one layer of quotes must be stripped.
145 lines
5.3 KiB
Makefile
145 lines
5.3 KiB
Makefile
## Process this file with automake to produce Makefile.in
|
|
|
|
AUTOMAKE_OPTIONS = 1.3e gnu
|
|
|
|
BUILD_SUBDIRS = . libltdl 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@
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS= @LIBS@
|
|
|
|
aclocal_macros = libtool.m4 ltdl.m4
|
|
|
|
EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \
|
|
mkstamp ChangeLog.0
|
|
CLEANFILES = libtool libtoolize ltconfig.T ltmain.shT
|
|
|
|
# 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
|
|
AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
|
|
MAGIC="$(MAGIC)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \
|
|
LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
|
|
AS="$(AS)" DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" ECHO="$(ECHO)" \
|
|
objext="$(OBJEXT)" exeext="$(EXEEXT)" reload_flag="$(reload_flag)" \
|
|
deplibs_check_method="$(deplibs_check_method)" file_magic_cmd="$(file_magic_cmd)" \
|
|
$(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \
|
|
--output=$@ $(srcdir)/ltmain.sh
|
|
|
|
# Experimental C version of libtool.
|
|
clibtool: $(srcdir)/ltmain.c $(srcdir)/ltconfig
|
|
AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
|
|
MAGIC="$(MAGIC)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \
|
|
LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
|
|
AS="$(AS)" DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" ECHO="$(ECHO)" \
|
|
objext="$(objext)" exeext="$(exeext)" reload_flag="$(reload_flag)" \
|
|
deplibs_check_method="$(deplibs_check_method)" file_magic_cmd="$(file_magic_cmd)" \
|
|
$(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --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
|
|
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
|
|
$(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-recursive: $(srcdir)/libltdl/acinclude.m4 $(ACINCLUDE_M4_LIST)
|
|
|
|
@srcdir@/libltdl/acinclude.m4: $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4
|
|
-rm -f $@ $@T
|
|
cat $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4 > $@T
|
|
mv $@T $@
|
|
|
|
@ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4
|
|
-rm -f $@ $@T
|
|
cat $(srcdir)/libtool.m4 > $@T
|
|
mv $@T $@
|
|
|
|
.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
|
|
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).
|
|
##
|
|
|
|
# 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
|