mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
As a prerequisite for being able to test an uninstalled libtoolize
for copying files correctly from the source tree, we must know exactly which files should be copied by the --ltdl option to avoid accidentally picking up compilation objects and other noise when $builddir == $srcdir: * libltdl/loaders/Makefile.am (ltdldatadir, ltdldatafiles) (install-data-local): Removed... * libltdl/Makefile.am (ltdldatafiles): ...and consolidated here. (show-ltdldatafiles): New rule... * Makefile.am (ltdldatafiles, libtoolize): ...used to substitute exactly which files are installed by libtoolize --ltdl. (edit): Move pkgvmacro_DATA substitution expression... (libtoolize): ...to here. * libtoolize.m4sh: Use func_copy_some_files() instead of func_copy_all_from_path() to copy the --ltdl option installed files. (pkgvltdldirs): New path variable to search for files installed by --ltdl option. (func_massage_pkgvltdl_files): New function to calculate the list of ltdl installation files.
This commit is contained in:
parent
1652028e3b
commit
53ee133dbd
24
ChangeLog
24
ChangeLog
@ -1,3 +1,27 @@
|
||||
2005-03-24 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
As a prerequisite for being able to test an uninstalled libtoolize
|
||||
for copying files correctly from the source tree, we must know
|
||||
exactly which files should be copied by the --ltdl option to avoid
|
||||
accidentally picking up compilation objects and other noise when
|
||||
$builddir == $srcdir:
|
||||
|
||||
* libltdl/loaders/Makefile.am (ltdldatadir, ltdldatafiles)
|
||||
(install-data-local): Removed...
|
||||
* libltdl/Makefile.am (ltdldatafiles): ...and consolidated here.
|
||||
(show-ltdldatafiles): New rule...
|
||||
* Makefile.am (ltdldatafiles, libtoolize): ...used to substitute
|
||||
exactly which files are installed by libtoolize --ltdl.
|
||||
(edit): Move pkgvmacro_DATA substitution expression...
|
||||
(libtoolize): ...to here.
|
||||
* libtoolize.m4sh: Use func_copy_some_files() instead of
|
||||
func_copy_all_from_path() to copy the --ltdl option installed
|
||||
files.
|
||||
(pkgvltdldirs): New path variable to search for files installed by
|
||||
--ltdl option.
|
||||
(func_massage_pkgvltdl_files): New function to calculate the list
|
||||
of ltdl installation files.
|
||||
|
||||
2005-03-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
|
||||
|
||||
* m4/libtool.m4, m4/ltdl.m4: Indentation and quoting cleanup.
|
||||
|
@ -43,7 +43,6 @@ edit = sed \
|
||||
-e 's,@host_triplet\@,$(host_triplet),g' \
|
||||
-e 's,@pkgvdatadir\@,$(pkgvdatadir),g' \
|
||||
-e 's,@pkgvmacrodir\@,$(pkgvmacrodir),g' \
|
||||
-e 's,@pkgvmacro_DATA\@,$(pkgvmacro_DATA),g' \
|
||||
-e 's,@prefix\@,$(prefix),g' \
|
||||
-e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
|
||||
|
||||
@ -163,7 +162,10 @@ 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,@pkgvmacro_DATA\@,$(pkgvmacro_DATA),g' \
|
||||
-e "s,@pkgvltdl_files\@,`echo $$ltdldatafiles`,g" \
|
||||
$(top_srcdir)/libtoolize.in > libtoolize.tmp
|
||||
chmod a+x libtoolize.tmp
|
||||
chmod a-w libtoolize.tmp
|
||||
|
@ -73,7 +73,14 @@ ltdldatafiles = COPYING.LIB README \
|
||||
$(libltdl_la_SOURCES) \
|
||||
lt__dirent.c libltdl/lt__dirent.h \
|
||||
lt__strl.c libltdl/lt__strl.h \
|
||||
argz_.h argz.c
|
||||
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:
|
||||
@ -82,6 +89,11 @@ install-data-local:
|
||||
( 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)"
|
||||
|
||||
## Make sure these will be cleaned even when they're not built by default:
|
||||
CLEANFILES = libltdl.la libltdlc.la libdlloader.la
|
||||
|
||||
|
@ -42,18 +42,3 @@ EXTRA_LTLIBRARIES = dlopen.la dld_link.la dyld.la load_add_on.la \
|
||||
dlopen_la_LIBADD = $(LIBADD_DLOPEN)
|
||||
shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
|
||||
dld_link_la_LIBADD = -ldld
|
||||
|
||||
|
||||
## These are installed as a subdirectory of pkgdatadir so that
|
||||
## libtoolize --ltdl can find them later:
|
||||
ltdldatadir = $(pkgvdatadir)/libltdl/loaders
|
||||
ltdldatafiles = Makefile.am Makefile.in \
|
||||
dld_link.c dlopen.c dyld.c \
|
||||
load_add_on.c loadlibrary.c 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 -; )
|
||||
|
@ -84,6 +84,7 @@ libtoolize_flags=
|
||||
prefix=@prefix@
|
||||
datadir=@datadir@
|
||||
pkgvdatadirs=@pkgvdatadir@
|
||||
pkgvltdldirs=@pkgvdatadir@/libltdl
|
||||
pkgvmacrodirs=@pkgvmacrodir@
|
||||
auxdir=
|
||||
m4dir=
|
||||
@ -143,7 +144,10 @@ configure_ac=configure.in
|
||||
|
||||
-I) test "$#" = 0 && func_missing_arg $opt && break
|
||||
test -d "$1" \
|
||||
&& pkgvdatadirs="`cd $1 && pwd`:$pkgvdatadirs"
|
||||
&& pkgvdatadirs="`cd $1 && pwd`:$pkgvltdldirs"
|
||||
test -d "$1" \
|
||||
&& pkgvltdldirs="`cd $1/libltdl \
|
||||
&& pwd`:$pkgvltdldirs"
|
||||
test -d "$1/m4" \
|
||||
&& pkgvmacrodirs="`cd $1/m4 && pwd`:$pkgvmacrodirs"
|
||||
func_quote_for_eval "$1"
|
||||
@ -396,8 +400,8 @@ func_scan_files ()
|
||||
|| func_fatal_help "\`$configure_ac' does not exist"
|
||||
|
||||
# TODO: check that existing directories from the list can be ls'ed
|
||||
#test -n "`{ cd $pkgvdatadir && ls; } 2>dev/null`" \
|
||||
# || func_fatal_error "can not list files in \`$pkgvdatadir'"
|
||||
#test -n "`{ cd $pkgvdatadirs && ls; } 2>dev/null`" \
|
||||
# || func_fatal_error "can not list files in \`$pkgvdatadirs'"
|
||||
|
||||
# Set local variables to reflect contents of configure.ac
|
||||
my_uses_autoconf=false
|
||||
@ -834,7 +838,7 @@ func_massage_pkgvmacro_DATA ()
|
||||
for my_filename in @pkgvmacro_DATA@; do
|
||||
my_filename=`$ECHO "X$my_filename" | $Xsed -e "$basename"`
|
||||
|
||||
# ignore excluded filenames
|
||||
# ignore excluded filenames
|
||||
if test -n "$my_glob_exclude"; then
|
||||
eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
|
||||
fi
|
||||
@ -847,6 +851,35 @@ func_massage_pkgvmacro_DATA ()
|
||||
}
|
||||
|
||||
|
||||
# func_massage_pkgvltdl_files [glob_exclude]
|
||||
# @pkgvltdl_files\@ is substituted as per its value in Makefile.am; this
|
||||
# function massages it into a suitable format for func_copy_some_files.
|
||||
func_massage_pkgvltdl_files ()
|
||||
{
|
||||
pkgvltdl_files= # GLOBAL VAR
|
||||
|
||||
my_glob_exclude="$1"
|
||||
|
||||
# Massage a value for pkgvltdl_files from the value used in Makefile.am
|
||||
for my_filename in @pkgvltdl_files@; do
|
||||
|
||||
# ignore excluded filenames
|
||||
if test -n "$my_glob_exclude"; then
|
||||
eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
|
||||
fi
|
||||
|
||||
# ignore duplicates
|
||||
case :$pkgvltdl_files: in
|
||||
*:$my_filename:*) ;;
|
||||
*) pkgvltdl_files="$pkgvltdl_files:$my_filename" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# strip spurious leading `:'
|
||||
pkgvltdl_files=`$ECHO "X$pkgvltdl_files" | $Xsed -e 's,^:*,,'`
|
||||
}
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Main. ##
|
||||
## ----------- ##
|
||||
@ -854,6 +887,8 @@ func_massage_pkgvmacro_DATA ()
|
||||
{
|
||||
rerun_aclocal=false
|
||||
|
||||
func_massage_pkgvltdl_files
|
||||
|
||||
# libtool.m4 and ltdl.m4 are handled specially below
|
||||
func_massage_pkgvmacro_DATA 'libtool.m4|ltdl.m4'
|
||||
|
||||
@ -865,7 +900,7 @@ func_massage_pkgvmacro_DATA ()
|
||||
# Copy all the files from installed (or specified, if `-I' was used)
|
||||
# libltdl to this project, if the user specified `--ltdl'.
|
||||
if test -n "$ltdldir"; then
|
||||
func_copy_all_from_path -r libltdl "$pkgvdatadirs" "$ltdldir"
|
||||
func_copy_some_files "$pkgvltdl_files" "$pkgvltdldirs" "$ltdldir"
|
||||
|
||||
# libtoolize the newly copied libltdl tree
|
||||
( cd "$ltdldir" && eval "$progpath" $libtoolize_flags ) \
|
||||
|
Loading…
Reference in New Issue
Block a user