]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/Makefile.am (@TOINST@/libltdl.la): if installation is
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 27 Jan 1999 06:15:21 +0000 (06:15 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 27 Jan 1999 06:15:21 +0000 (06:15 +0000)
enabled, create to-be-installed libltdl.la within @TOINST@
directory
(noinst_LTLIBRARIES): even if installation is enabled, build
convenience libltdl.la, otherwise builds of random packages may
fail if the user happens to enable installation
(distclean-hook): wipe out $(TOINST)
* libltdl/configure.in: set TOINST and LIBLIBS as appropriate;
don't set NOINSTLIBS any more
* mdemo/Makefile.am: use libltdl.la

ChangeLog
libltdl/Makefile.am
libltdl/configure.in
mdemo/Makefile.am

index 6a85cb87ce457ef29e795e2f987588e84f1d8804..a29360a4277792b750e07f8a604f6401f0cd32a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 1999-01-27  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * libltdl/Makefile.am (@TOINST@/libltdl.la): if installation is
+       enabled, create to-be-installed libltdl.la within @TOINST@
+       directory
+       (noinst_LTLIBRARIES): even if installation is enabled, build
+       convenience libltdl.la, otherwise builds of random packages may
+       fail if the user happens to enable installation
+       (distclean-hook): wipe out $(TOINST)
+       * libltdl/configure.in: set TOINST and LIBLIBS as appropriate;
+       don't set NOINSTLIBS any more
+       * mdemo/Makefile.am: use libltdl.la
+
        * libltdl/ltdl.c (find_file): oops, filenamesize was miscomputed
 
        * libltdl/ltdl.c (find_file): allocate filename dynamically
index e0ebbf5b486a5ba07b9de0eb4b87d85cf1904cb3..529f2641c4bb3e7649a97e9b9986b8a65d963bc5 100644 (file)
@@ -5,25 +5,29 @@ AUTOMAKE_OPTIONS = no-dependencies foreign
 LTDL_VERSION = -version-info 1:1:1
 
 if INSTALL_LTDL
-LTDL_FLAGS = $(LTDL_VERSION) -rpath $(libdir) 
 include_HEADERS = ltdl.h
 else
-LTDL_FLAGS =
 noinst_HEADERS = ltdl.h
 endif
 
-EXTRA_LTLIBRARIES = libltdl.la libltdlc.la
-
-lib_LTLIBRARIES = @LIBLIBS@
-noinst_LTLIBRARIES = @NOINSTLIBS@
+noinst_LTLIBRARIES = libltdl.la
 
 libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = $(LTDL_FLAGS)
 libltdl_la_LIBADD = $(LIBADD_DL)
 
-libltdlc_la_SOURCES = $(libltdl_la_SOURCES)
-libltdlc_la_LDFLAGS =
-libltdlc_la_LIBADD = $(libltdl_la_LIBADD)
+lib_LTLIBRARIES = @LIBLIBS@
+EXTRA_LTLIBRARIES =
+
+@TOINST@/libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES)
+       @test -d $(TOINST) || mkdir $(TOINST)
+       $(LINK) -o $@ $(libltdl_la_OBJECTS) \
+               -rpath $(libdir) $(LTDL_VERSION) $(libltdl_la_LIBADD)
+
+## automake 1.4 claims to support distclean-hook, but it does not :-(
+.PHONY: distclean-hook
+distclean-am: distclean-hook
+distclean-hook:
+       test -z $(TOINST) || rm -rf $(TOINST)
 
 libtool: $(LIBTOOL_DEPS)
        $(SHELL) ./config.status --recheck
index dd7359418dcd7fcf6abc397840dbba526f92bc6f..7cd1f78083caff1f44512ea44cb08bcfcded7bde 100644 (file)
@@ -5,18 +5,18 @@ AM_INIT_AUTOMAKE(libltdl,1.0,-)
 
 AM_MAINTAINER_MODE
 
+TOINST=toinst
+AC_SUBST(TOINST)
+
 AC_ARG_ENABLE(ltdl-install,
   [--enable-ltdl-install     install libltdl])
 AM_CONDITIONAL(INSTALL_LTDL, test x$enable_ltdl_install = xyes)
 if test x$enable_ltdl_install = xyes; then
-  LIBLIBS=libltdl.la
-  NOINSTLIBS=
+  LIBLIBS=$TOINST/libltdl.la
 else
   LIBLIBS=
-  NOINSTLIBS=libltdl.la
 fi
 AC_SUBST(LIBLIBS)
-AC_SUBST(NOINSTLIBS)
 
 AC_PROG_CC
 AC_C_CONST
index e1a5a28c1207158a0c1f1bac3bf0b41d7b3284e0..97ed28be754e779499e499b3e87151c60cc9619e 100644 (file)
@@ -18,9 +18,9 @@ noinst_HEADERS = foo.h
 
 bin_PROGRAMS = mdemo mdemo.debug
 
-../libltdl/libltdlc.la: ../libtool ../libltdl/libtool \
+../libltdl/libltdl.la: ../libtool ../libltdl/libtool \
     $(srcdir)/../libltdl/ltdl.c $(srcdir)/../libltdl/ltdl.h
-       (cd ../libltdl; $(MAKE) libltdlc.la)
+       (cd ../libltdl; $(MAKE) libltdl.la)
 # Without the following line, the check may fail if libltdl/libtool is
 # removed after libltdl is configured
 ../libltdl/libtool:
@@ -30,8 +30,8 @@ mdemo_SOURCES = main.c
 mdemo_LDFLAGS = -export-dynamic ## FIXME: remove this when libtool and libltdl
 ## handle dependencies of modules
 ## The quotes around -dlopen below fool automake into accepting it
-mdemo_LDADD = ../libltdl/libltdlc.la "-dlopen" foo1.la "-dlopen" libfoo2.la
-mdemo_DEPENDENCIES = ../libltdl/libltdlc.la foo1.la libfoo2.la
+mdemo_LDADD = ../libltdl/libltdl.la "-dlopen" foo1.la "-dlopen" libfoo2.la
+mdemo_DEPENDENCIES = ../libltdl/libltdl.la foo1.la libfoo2.la
 
 # Create an easier-to-debug version of mdemo.
 mdemo_debug_SOURCES = $(mdemo_SOURCES)