-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay to commit to HEAD, and backport to branch-2-0?

        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.


- -- 
Gary V. Vaughan      ())_.  [EMAIL PROTECTED],gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/[EMAIL PROTECTED]/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCTYeVFRMICSmD1gYRAk97AJ44f0RRcWOgvsUUrZZd4sIBzOmRbwCeIZvc
EKz73s/Tv2B/IZIIYq934JY=
=06KK
-----END PGP SIGNATURE-----
* looking for [EMAIL PROTECTED]/libtool--gary--1.0--patch-13 to compare with
* comparing to [EMAIL PROTECTED]/libtool--gary--1.0--patch-13
M  Makefile.am
M  configure.ac
M  libltdl/Makefile.am
M  m4/ltdl.m4
M  ChangeLog

* modified files

Index: Changelog
from  Gary V. Vaughan  <[EMAIL PROTECTED]>
	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  <[EMAIL PROTECTED]>

--- orig/Makefile.am
+++ mod/Makefile.am
@@ -161,10 +161,9 @@
 	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 @@
 	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 @@
 ## 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


--- orig/configure.ac
+++ mod/configure.ac
@@ -208,6 +208,5 @@
 ## -------- ##
 ## 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


--- orig/libltdl/Makefile.am
+++ mod/libltdl/Makefile.am
@@ -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_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)
 
-## 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)"
+## 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
+
+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


--- orig/m4/ltdl.m4
+++ mod/m4/ltdl.m4
@@ -448,7 +448,7 @@
 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])



Reply via email to