]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Getting the value of ltdldatafiles from a submake was not
authorGary V. Vaughan <gary@gnu.org>
Mon, 4 Apr 2005 12:12:25 +0000 (12:12 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 4 Apr 2005 12:12:25 +0000 (12:12 +0000)
portable, and had problems with GNU make-3.80 at least.  This
changeset pulls the installation rules for libtoolize's copy of
the libltdl sources out of libltdl/Makefile.am so that
ltdldatafiles is defined in the same Makefile that uses it.  Also,
this makes a start at cleaning up libltdl/Makefile.am so that it
is useful in a package that uses `libtoolize --ltdl':

* libltdl/loaders/Makefile.am: Removed entirely.
* libltdl/Makefile.am (dlopen.la, dld_link.la, dyld.la)
(load_add_on.la, loadlibrary.la, shl_load.la): All built from here
now that the loaders submake has gone.
(show-ltdldatafiles): Removed.  No longer required.
(ltdldatadir, ltdldatafiles, install-local): Moved from here...
* Makefile.am (ltdldatadir, ltdldatafiles, install-local): ..to
here.
(libtoolize): Substitute $(ltdldatafiles) directly without calling
make to get the value from libltdl/Makefile.

ChangeLog
Makefile.am
configure.ac
libltdl/Makefile.am
m4/ltdl.m4

index 56d3a8717672ad54d6eed2ce154f3be906225304..1ed3838eb776037785ecb64f667d6bf21756f246 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2005-04-04  Gary V. Vaughan  <gary@gnu.org>
+
+       Getting the value of ltdldatafiles from a submake was not
+       portable, and had problems with GNU make-3.80 at least.  This
+       changeset pulls the installation rules for libtoolize's copy of
+       the libltdl sources out of libltdl/Makefile.am so that
+       ltdldatafiles is defined in the same Makefile that uses it.  Also,
+       this makes a start at cleaning up libltdl/Makefile.am so that it
+       is useful in a package that uses `libtoolize --ltdl':
+
+       * libltdl/loaders/Makefile.am: Removed entirely.
+       * libltdl/Makefile.am (dlopen.la, dld_link.la, dyld.la)
+       (load_add_on.la, loadlibrary.la, shl_load.la): All built from here
+       now that the loaders submake has gone.
+       (show-ltdldatafiles): Removed.  No longer required.
+       (ltdldatadir, ltdldatafiles, install-local): Moved from here...
+       * Makefile.am (ltdldatadir, ltdldatafiles, install-local): ..to
+       here.
+       (libtoolize): Substitute $(ltdldatafiles) directly without calling
+       make to get the value from libltdl/Makefile.
+
 2005-04-01  Gary V. Vaughan  <gary@gnu.org>
 
        * Makefile.am (libtoolize): Substitute $(nobase_pkgvdata_DATA).
index fb5c707852f30d0bd74faaa4ed7e4b96e21f8733..b748069cbdef6dc169112c0a27c9d03a58f64a9a 100644 (file)
@@ -161,10 +161,9 @@ libtoolize: $(top_srcdir)/libtoolize.in
        rm -f libtoolize.tmp libtoolize
        $(timestamp); \
        input="libtoolize.m4sh"; \
-       ltdldatafiles=`cd libltdl; make show-ltdldatafiles`; \
        $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
                -e 's,@nobase_pkgvdata_DATA\@,$(nobase_pkgvdata_DATA),g' \
-               -e "s,@pkgvltdl_files\@,`echo $$ltdldatafiles`,g" \
+               -e "s,@pkgvltdl_files\@,`echo $(ltdldatafiles)`,g" \
                $(top_srcdir)/libtoolize.in > libtoolize.tmp
        chmod a+x libtoolize.tmp
        chmod a-w libtoolize.tmp
@@ -213,6 +212,37 @@ configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
        abs_srcdir=`cd $(top_srcdir) && pwd`; \
        (cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
 
+## These are installed as a subdirectory of pkgdatadir so that
+## libtoolize --ltdl can find them later:
+ltdldatadir            = $(pkgvdatadir)/libltdl
+ltdldatafiles          = COPYING.LIB README \
+                         Makefile.am Makefile.in \
+                         argz_.h argz.c \
+                         configure.ac configure \
+                         libltdl/lt__alloc.h \
+                         libltdl/lt__dirent.h \
+                         libltdl/lt__glibc.h \
+                         libltdl/lt__private.h \
+                          libltdl/lt__strl.h \
+                         libltdl/lt_dlloader.h \
+                         libltdl/lt_error.h \
+                          libltdl/lt_system.h \
+                         libltdl/slist.h \
+                         loaders/dld_link.c \
+                         loaders/dlopen.c \
+                         loaders/dyld.c \
+                         loaders/load_add_on.c \
+                         loaders/loadlibrary.c \
+                         loaders/preopen.c \
+                         loaders/shl_load.c \
+                         lt__alloc.c \
+                         lt__dirent.c \
+                         lt__strl.c \
+                         lt_dlloader.c \
+                         lt_error.c \
+                         ltdl.c ltdl.h \
+                         slist.c
+
 install-data-local:
 ## Don't install over the top of an old pkgvdatadir
        -rm -rf $(DESTDIR)$(pkgvdatadir)
@@ -221,6 +251,11 @@ install-data-local:
 ## Remove old macro definitions
        -rm -rf $(DESTDIR)$(aclocaldir)/ltdl.m4
        -rm -rf $(DESTDIR)$(aclocaldir)/libtool.m4
+## To avoid spurious reconfiguration when the user installs these files
+## with libtoolize, we have to preserve their timestamps carefully:
+       $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
+       ( cd $(srcdir)/libltdl && $(AMTAR) chf - $(ltdldatafiles); ) \
+         | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
 
 install-data-hook:
        chmod +x $(DESTDIR)$(pkgvdatadir)/config/config.guess
index d2df8479adb2b3b6d89f176dcc76eb3afc75a13d..292fdac8e56523999ade70731f3ec4f07318e840 100644 (file)
@@ -208,6 +208,5 @@ AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
 ## -------- ##
 ## Outputs. ##
 ## -------- ##
-AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
-               doc/Makefile tests/Makefile])
+AC_CONFIG_FILES([Makefile libltdl/Makefile doc/Makefile tests/Makefile])
 AC_OUTPUT
index c28ab3f48c5a10f9d97b1bda799268e8eda2eec9..86e3d1853018f1b237b54b1b7afef71a454312ed 100644 (file)
@@ -18,8 +18,6 @@
 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ## Boston, MA 02111-1307, USA.
 
-SUBDIRS                        = loaders .
-
 BUILT_SOURCES          =
 MOSTLYCLEANFILES       =
 EXTRA_DIST             = configure.ac
@@ -32,67 +30,74 @@ AM_CPPFLAGS         = -I. -I$(srcdir) -I$(srcdir)/libltdl
 AM_LDFLAGS             = -no-undefined
 VERSION_INFO           = -version-info 6:0:0
 
-pkgincludedir          = $(includedir)/libltdl
+noinst_LTLIBRARIES     = $(LT_DLLOADERS)
 
 if INSTALL_LTDL
-include_HEADERS                = ltdl.h
-pkginclude_HEADERS     = libltdl/lt_system.h libltdl/lt_error.h \
+nobase_include_HEADERS = ltdl.h \
+                         libltdl/lt_system.h libltdl/lt_error.h \
                          libltdl/lt_dlloader.h
 lib_LTLIBRARIES                = libltdl.la
 endif
 
 if CONVENIENCE_LTDL
-noinst_LTLIBRARIES     = libltdlc.la
+noinst_LTLIBRARIES     += libltdlc.la
 endif
 
-libltdl_la_SOURCES     = ltdl.c ltdl.h \
-                         lt_error.c libltdl/lt_error.h \
+## !!NOTE!! Be sure to update ../Makefile.am:ltdldatafiles if you
+##          make any changes here:
+libltdl_la_SOURCES     = libltdl/lt__alloc.h \
+                         libltdl/lt__dirent.h \
+                         libltdl/lt__glibc.h \
                          libltdl/lt__private.h \
                           libltdl/lt__strl.h \
+                         libltdl/lt_dlloader.h \
+                         libltdl/lt_error.h \
                           libltdl/lt_system.h \
-                         lt__alloc.c libltdl/lt__alloc.h \
-                         libltdl/lt__glibc.h \
-                         libltdl/lt__dirent.h \
-                         slist.c libltdl/slist.h \
-                         lt_dlloader.c libltdl/lt_dlloader.h loaders/preopen.c
+                         libltdl/slist.h \
+                         loaders/preopen.c \
+                         lt__alloc.c \
+                         lt_dlloader.c \
+                         lt_error.c \
+                         ltdl.c ltdl.h \
+                         slist.c
 libltdl_la_CPPFLAGS    = -DLTDLOPEN=libltdl $(AM_CPPFLAGS)
 libltdl_la_LDFLAGS     = $(AM_LDFLAGS) $(VERSION_INFO) $(LT_DLPREOPEN)
 libltdl_la_LIBADD      = $(LTLIBOBJS)
+libltdl_la_DEPENDENCIES        = $(LT_DLLOADERS) $(LTLIBOBJS)
 
 libltdlc_la_SOURCES    = $(libltdl_la_SOURCES)
 libltdlc_la_CPPFLAGS   = -DLTDLOPEN=libltdlc $(AM_CPPFLAGS)
 libltdlc_la_LDFLAGS    = $(AM_LDFLAGS) $(LT_DLPREOPEN)
 libltdlc_la_LIBADD     = $(libltdl_la_LIBADD)
+libltdlc_la_DEPENDENCIES= $(libltdl_la_DEPENDENCIES)
+
+## The loaders are preopened by libltdl, itself always built from
+## pic-objects (either as a shared library, or a convenience library),
+## so the loaders themselves must be made from pic-objects too.  We
+## use convenience libraries for that purpose:
+EXTRA_LTLIBRARIES      = dlopen.la dld_link.la dyld.la load_add_on.la \
+                         loadlibrary.la shl_load.la
+
+dlopen_la_SOURCES      = loaders/dlopen.c
+dlopen_la_LDFLAGS      = -module -avoid-version
+dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
+
+dld_link_la_SOURCES    = loaders/dld_link.c
+dld_link_la_LDFLAGS    = -module -avoid-version
+dld_link_la_LIBADD     = -ldld
+
+dyld_la_SOURCES                = loaders/dyld.c
+dyld_la_LDFLAGS                = -module -avoid-version
+
+load_add_on_la_SOURCES = loaders/load_add_on.c
+load_add_on_la_LDFLAGS = -module -avoid-version
+
+loadlibrary_la_SOURCES = loaders/loadlibrary.c
+loadlibrary_la_LDFLAGS = -module -avoid-version
 
-## These are installed as a subdirectory of pkgdatadir so that
-## libtoolize --ltdl can find them later:
-ltdldatadir            = $(pkgvdatadir)/libltdl
-ltdldatafiles          = COPYING.LIB README \
-                         Makefile.am Makefile.in \
-                         configure.ac configure \
-                         $(libltdl_la_SOURCES) \
-                         lt__dirent.c libltdl/lt__dirent.h \
-                         lt__strl.c libltdl/lt__strl.h \
-                         argz_.h argz.c \
-                         loaders/Makefile.am loaders/Makefile.in \
-                         loaders/dld_link.c \
-                         loaders/dlopen.c \
-                         loaders/dyld.c \
-                         loaders/load_add_on.c \
-                         loaders/loadlibrary.c \
-                         loaders/shl_load.c
-
-## To avoid spurious reconfiguration when the user installs these files
-## with libtoolize, we have to preserve their timestamps carefully:
-install-data-local:
-       $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
-       ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
-         | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
-
-## This rule is used by the top Makefile.am to get the list of ltdl
-## files that libtoolize will use to implement 'libtoolize --ltdl':
-show-ltdldatafiles:
-       @echo "$(ltdldatafiles)"
+shl_load_la_SOURCES    = loaders/shl_load.c
+shl_load_la_LDFLAGS    = -module -avoid-version
+shl_load_la_LIBADD     = $(LIBADD_SHL_LOAD)
 
 ## Make sure these will be cleaned even when they're not built by default:
 CLEANFILES             = libltdl.la libltdlc.la libdlloader.la
index c7ac88b98cac422cecf516eb4df7533712d3be1e..1cd271040b0b11649e02ac287942aa62a934e72b 100644 (file)
@@ -448,7 +448,7 @@ LT_DLPREOPEN=
 if test -n "$LT_DLLOADERS"
 then
   for lt_loader in $LT_DLLOADERS; do
-    LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen loaders/$lt_loader "
+    LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
   done
   AC_DEFINE([HAVE_LIBDLLOADER], [1],
             [Define if libdlloader will be built on this platform])