]> 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:29:52 +0000 (12:29 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 4 Apr 2005 12:29:52 +0000 (12:29 +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
libltdl/loaders/Makefile.am [deleted file]
m4/ltdl.m4

index 2844ed9a26601ab4ec5822881232a8ced2cc33c5..f6328f6b0a4e1a5b634af087b5339b7e6366e858 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,25 @@
-2005-03-29  Gary V. Vaughan  <gary@gnu.org>
+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>
 
        Fix problems with serial comparison sed scripts, and factor out
        common code from similar serial comparison functions:
index 50c9ce260e5365ef94f98048dde712f2a8fcff63..696060f60d9c791096aa4c065795b2f0e97c40f6 100644 (file)
@@ -135,10 +135,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,@aclocal_DATA\@,$(aclocal_DATA),g' \
-               -e "s,@pkgvltdl_files\@,`echo $$ltdldatafiles`,g" \
+               -e "s,@pkgvltdl_files\@,$(ltdldatafiles),g" \
                $(top_srcdir)/libtoolize.in > libtoolize.tmp
        chmod a+x libtoolize.tmp
        chmod a-w libtoolize.tmp
@@ -183,9 +182,45 @@ 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 pkgdatadir
        -rm -rf $(DESTDIR)$(pkgdatadir)
+## 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)$(pkgdatadir)/config.guess
index 63e60f518f46e61366d9bb32837d05739bdcd671..6d27686922a03906b2f04ff1e099f556e3da07f5 100644 (file)
@@ -184,6 +184,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 b35a3e1ce4cd3fa660392c88f953788f7ed570bd..15d2b1c64d8d096e4035ca2d5c6cd520d448c2a6 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            = $(pkgdatadir)/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
diff --git a/libltdl/loaders/Makefile.am b/libltdl/loaders/Makefile.am
deleted file mode 100644 (file)
index 18dc2f1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-## Process this file with automake to produce Makefile.in
-##
-## Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-##
-## 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.
-
-BUILT_SOURCES          =
-MOSTLYCLEANFILES       =
-EXTRA_DIST             =
-
-AUTOMAKE_OPTIONS       = foreign
-
-DEFS                   = -DHAVE_CONFIG_H="<$(CONFIG_H)>" -DLTDL
-AM_CPPFLAGS            = -I$(top_builddir) -I$(top_srcdir)  \
-                         -I.. -I$(srcdir)/.. -I$(srcdir)/../libltdl
-AM_LDFLAGS             = -module -avoid-version
-
-pkgincludedir          = $(includedir)/libltdl
-
-
-## 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:
-noinst_LTLIBRARIES     = $(LT_DLLOADERS)
-EXTRA_LTLIBRARIES      = dlopen.la dld_link.la dyld.la load_add_on.la \
-                         loadlibrary.la shl_load.la
-
-dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
-shl_load_la_LIBADD     = $(LIBADD_SHL_LOAD)
-dld_link_la_LIBADD     = -ldld
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])