mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-17 15:10:02 +08:00
libtoolize: rename Makefile.inc' to standard
ltdl.mk'.
* libltdl/Makefile.inc: Moved from here... * libltdl/ltdl.mk: ...to here. * Makefile.am, bootstrap.conf, tests/libtoolize.at, tests/nonrecursive.at: Adjust. * libtoolize.m4sh (func_install_pkgltdl_files): Set the destination file to `Makefile.inc' if grep finds an include for that name in a top-level Makefile.am. (func_check_macros): Print a deprecation warning if use of the old `Makefile.inc' convention is found. * tests/old-ltdl-iface.at: New test for renaming and warning correctly when `Makefile.inc' convention is still in use. * NEWS: Updated. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
parent
0c19864f3d
commit
76fff42c2a
13
Makefile.am
13
Makefile.am
@ -189,12 +189,12 @@ $(libtoolize_in): $(libtoolize_m4sh) $(sh_files) Makefile.am
|
||||
|
||||
lt_Makefile_am = $(srcdir)/$(ltdl_dir)/Makefile.am
|
||||
lt_Makefile_in = $(srcdir)/$(ltdl_dir)/Makefile.in
|
||||
lt_Makefile_inc = $(srcdir)/$(ltdl_dir)/Makefile.inc
|
||||
ltdl_mk = $(srcdir)/$(ltdl_dir)/ltdl.mk
|
||||
|
||||
$(lt_Makefile_am): $(lt_Makefile_inc)
|
||||
$(lt_Makefile_am): $(ltdl_mk)
|
||||
$(AM_V_at)rm -f '$@'
|
||||
$(AM_V_GEN)( '$(SED)' -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' \
|
||||
'$(lt_Makefile_inc)'; \
|
||||
'$(ltdl_mk)'; \
|
||||
{ echo 'ACLOCAL_AMFLAGS = -I m4'; \
|
||||
echo 'AUTOMAKE_OPTIONS = foreign'; \
|
||||
echo 'AM_CPPFLAGS ='; \
|
||||
@ -209,7 +209,7 @@ $(lt_Makefile_am): $(lt_Makefile_inc)
|
||||
echo 'MOSTLYCLEANFILES ='; \
|
||||
}; \
|
||||
'$(SED)' -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' \
|
||||
'$(lt_Makefile_inc)' \
|
||||
'$(ltdl_mk)' \
|
||||
|'$(SED)' -e 's,libltdl_,,; s,libltdl/,,; s,: libltdl/,: ,' \
|
||||
-e 's,\$$(libltdl_,$$(,' \
|
||||
) |'$(SED)' -e '/^.. DO NOT REMOVE THIS LINE -- /d' \
|
||||
@ -332,7 +332,7 @@ configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
|
||||
## Libltdl. ##
|
||||
## -------- ##
|
||||
|
||||
include libltdl/Makefile.inc
|
||||
include libltdl/ltdl.mk
|
||||
|
||||
lt_aclocal_m4 = $(srcdir)/$(ltdl_dir)/aclocal.m4
|
||||
lt_config_h_in = $(srcdir)/$(ltdl_dir)/config-h.in
|
||||
@ -466,7 +466,6 @@ pkgmacro_files = argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 \
|
||||
pkgltdl_files = COPYING.LIB \
|
||||
Makefile.am \
|
||||
Makefile.in \
|
||||
Makefile.inc \
|
||||
README \
|
||||
configure.ac \
|
||||
aclocal.m4 \
|
||||
@ -497,6 +496,7 @@ pkgltdl_files = COPYING.LIB \
|
||||
lt_error.c \
|
||||
ltdl.c \
|
||||
ltdl.h \
|
||||
ltdl.mk \
|
||||
slist.c
|
||||
|
||||
install-data-local: $(lt_Makefile_in)
|
||||
@ -652,6 +652,7 @@ TESTSUITE_AT = tests/testsuite.at \
|
||||
tests/versioning.at \
|
||||
tests/destdir.at \
|
||||
tests/old-m4-iface.at \
|
||||
tests/old-ltdl-iface.at \
|
||||
tests/am-subdir.at \
|
||||
tests/lt_dlexit.at \
|
||||
tests/lt_dladvise.at \
|
||||
|
6
NEWS
6
NEWS
@ -40,6 +40,12 @@ NEWS - list of user-visible changes between releases of GNU Libtool
|
||||
`configure.ac' (or `configure.in') that needs tracing to determine
|
||||
what modes and directories have been specified.
|
||||
|
||||
- The use of the idiosyncratically named `Makefile.inc' in nonrecursive
|
||||
libltdl builds is deprecated, although it will be supported for one
|
||||
more year or until the next release, whichever takes longer. Please
|
||||
upgrade to the more standard naming of `ltdl.mk' in keeping with other
|
||||
GNU projects.
|
||||
|
||||
New in 2.4.2 2011-10-17: git version 2.4.1a, Libtool team:
|
||||
|
||||
* New features:
|
||||
|
@ -314,7 +314,7 @@ libtool_build_prerequisites ()
|
||||
func_verbose "ltdl_dir='$ltdl_dir'"
|
||||
|
||||
# Whip up a dirty Makefile:
|
||||
makes='Makefile.am libltdl/Makefile.inc'
|
||||
makes='Makefile.am libltdl/ltdl.mk'
|
||||
rm -f Makefile
|
||||
{
|
||||
echo "aux_dir = $build_aux"
|
||||
|
@ -2558,7 +2558,7 @@ you will need to add the following to the @file{Makefile.am} of the
|
||||
parent project:
|
||||
|
||||
@example
|
||||
## libltdl/Makefile.inc @r{appends to the following variables}
|
||||
## libltdl/ltdl.mk @r{appends to the following variables}
|
||||
## @r{so we set them here before including it:}
|
||||
BUILT_SOURCES =
|
||||
|
||||
@ -2575,7 +2575,7 @@ EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
MOSTLYCLEANFILES =
|
||||
|
||||
include libltdl/Makefile.inc
|
||||
include libltdl/ltdl.mk
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
@ -4816,14 +4816,14 @@ noinst_LTLIBRARIES =
|
||||
lib_LTLIBRARIES =
|
||||
EXTRA_LTLIBRARIES =
|
||||
|
||||
include libltdl/Makefile.inc
|
||||
include libltdl/ltdl.mk
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Unless you build no other libraries from this @file{Makefile.am},
|
||||
you will also need to change @code{lib_LTLIBRARIES} to assign with
|
||||
@samp{+=} so that the @code{libltdl} targets declared in
|
||||
@file{Makefile.inc} are not overwritten.
|
||||
@file{ltdl.mk} are not overwritten.
|
||||
|
||||
@item recursive
|
||||
This build mode still requires that you use Automake, but (in contrast
|
||||
|
@ -1,4 +1,4 @@
|
||||
## Makefile.inc -- includable Makefile.am snippet
|
||||
## ltdl.mk -- includable Makefile snippet
|
||||
##
|
||||
## Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
## Written by Gary V. Vaughan, 2003
|
@ -865,7 +865,7 @@ func_install_pkgltdl_files ()
|
||||
esac
|
||||
;;
|
||||
|
||||
Makefile.inc)
|
||||
ltdl.mk)
|
||||
test nonrecursive = "$ltdl_mode" || continue
|
||||
my_copy_filter=$Makefile_inc_filter
|
||||
;;
|
||||
@ -889,6 +889,13 @@ func_install_pkgltdl_files ()
|
||||
# Still here? Copy the file then, with selected filters.
|
||||
func_copy "$file" "$pkgltdldir" "$ltdl_dir" \
|
||||
pkgltdl_header "$my_copy_filter"
|
||||
|
||||
# FIXME: Remove in 2013
|
||||
# (along with deprecation warning in func_check_macros)
|
||||
test ltdl.mk = "$file" \
|
||||
&& func_grep "^-\?include $ltdl_dir/Makefile.inc\$" Makefile.am \
|
||||
&& mv "$ltdl_dir/$file" "$ltdl_dir/Makefile.inc" \
|
||||
&& func_whisper "renaming file \`$ltdl_dir/Makefile.inc'"
|
||||
done
|
||||
}
|
||||
|
||||
@ -1099,6 +1106,17 @@ func_check_macros ()
|
||||
test -n "$ac_ltdl_dir" ||
|
||||
func_echo "Remember to add \`LT_CONFIG_LTDL_DIR([$ltdl_dir])' to \`$configure_ac'."
|
||||
|
||||
# For nonrecursive mode, warn about continued use of Makefile.inc:
|
||||
# FIXME: Remove in 2013
|
||||
# (along with last minute rename in func_install_pkgltdl_files)
|
||||
if test "x$ltdl_mode" = "xnonrecursive"; then
|
||||
if func_grep "^-\?include $ltdl_dir/Makefile.inc\$" Makefile.am;
|
||||
then
|
||||
func_error "Use of \`include $ltdl_dir/Makefile.inc' is deprecated!"
|
||||
func_echo "Consider updating to use of \`include $ltdl_dir/ltdl.mk' in Makefile.am."
|
||||
fi
|
||||
fi
|
||||
|
||||
# For subproject mode, offer some suggestions for avoiding duplicate
|
||||
# files in a project that uses libltdl:
|
||||
if test "x$ltdl_mode" = "xsubproject"; then
|
||||
@ -1646,7 +1664,7 @@ func_require_seen_libtool ()
|
||||
# without --install, and the project may not be using Automake.
|
||||
all_pkgaux_files="compile install-sh depcomp missing ltmain.sh snippet/_Noreturn.h snippet/arg-nonnull.h snippet/c++defs.h snippet/warn-on-use.h"
|
||||
all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4"
|
||||
all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in 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"
|
||||
all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in 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 ltdl.mk slist.c"
|
||||
|
||||
# Files installed by func_install_*, some files are missing from these
|
||||
# lists deliberately because their respective func_install has to handle
|
||||
|
@ -296,7 +296,6 @@ libtoolize: copying file `m4/ltversion.m4'
|
||||
libtoolize: copying file `m4/lt~obsolete.m4'
|
||||
libtoolize: putting libltdl files in `ltdl'.
|
||||
libtoolize: copying file `ltdl/COPYING.LIB'
|
||||
libtoolize: creating file `ltdl/Makefile.inc'
|
||||
libtoolize: copying file `ltdl/README'
|
||||
libtoolize: copying file `ltdl/argz_.h'
|
||||
libtoolize: copying file `ltdl/argz.c'
|
||||
@ -323,6 +322,7 @@ libtoolize: copying file `ltdl/lt_dlloader.c'
|
||||
libtoolize: copying file `ltdl/lt_error.c'
|
||||
libtoolize: copying file `ltdl/ltdl.c'
|
||||
libtoolize: copying file `ltdl/ltdl.h'
|
||||
libtoolize: creating file `ltdl/ltdl.mk'
|
||||
libtoolize: copying file `ltdl/slist.c'
|
||||
libtoolize: Remember to add `LT_CONFIG_LTDL_DIR([ltdl])' to `configure.ac'.
|
||||
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
|
||||
@ -798,7 +798,6 @@ libtoolize: copying file `m4/ltversion.m4'
|
||||
libtoolize: copying file `m4/lt~obsolete.m4'
|
||||
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
|
||||
libtoolize: copying file `ltdl/COPYING.LIB'
|
||||
libtoolize: creating file `ltdl/Makefile.inc'
|
||||
libtoolize: copying file `ltdl/README'
|
||||
libtoolize: copying file `ltdl/argz_.h'
|
||||
libtoolize: copying file `ltdl/argz.c'
|
||||
@ -825,6 +824,7 @@ libtoolize: copying file `ltdl/lt_dlloader.c'
|
||||
libtoolize: copying file `ltdl/lt_error.c'
|
||||
libtoolize: copying file `ltdl/ltdl.c'
|
||||
libtoolize: copying file `ltdl/ltdl.h'
|
||||
libtoolize: creating file `ltdl/ltdl.mk'
|
||||
libtoolize: copying file `ltdl/slist.c'
|
||||
]])
|
||||
|
||||
|
@ -62,7 +62,7 @@ EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
MOSTLYCLEANFILES =
|
||||
|
||||
include ltdl/Makefile.inc
|
||||
include ltdl/ltdl.mk
|
||||
|
||||
foo_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
foo_la_SOURCES = foo.c
|
||||
|
138
tests/old-ltdl-iface.at
Normal file
138
tests/old-ltdl-iface.at
Normal file
@ -0,0 +1,138 @@
|
||||
# old-ltdl-iface.at -- exercise old libtoolize interface to libltdl
|
||||
#
|
||||
# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2011
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
#
|
||||
# GNU Libtool 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.
|
||||
#
|
||||
# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
|
||||
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
|
||||
# or obtained by writing to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
####
|
||||
|
||||
# FIXME: Remove this test in 2013, along with support for Makefile.inc
|
||||
|
||||
|
||||
AT_BANNER([Support for older libltdl interfaces.])
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## Support for Makefile.inc. ##
|
||||
## ------------------------- ##
|
||||
|
||||
AT_SETUP([Makefile.inc])
|
||||
|
||||
AT_DATA([configure.in],
|
||||
[[AC_INIT([old-ltdl-iface-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_LIBOBJ_DIR([ltdl])
|
||||
LT_CONFIG_LTDL_DIR([ltdl])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
LT_INIT
|
||||
LTDL_INIT([nonrecursive])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
]])
|
||||
|
||||
AT_DATA([Makefile.am],
|
||||
[[ACLOCAL_AMFLAGS = -I m4
|
||||
BUILT_SOURCES =
|
||||
AM_CPPFLAGS =
|
||||
AM_LDFLAGS =
|
||||
include_HEADERS =
|
||||
noinst_LTLIBRARIES =
|
||||
lib_LTLIBRARIES =
|
||||
EXTRA_LTLIBRARIES =
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
MOSTLYCLEANFILES =
|
||||
include ltdl/Makefile.inc
|
||||
bin_PROGRAMS = old
|
||||
old_LDADD = -Lltdl $(LIBLTDL)
|
||||
]])
|
||||
|
||||
AT_DATA([old.c],
|
||||
[[#include <stdio.h>
|
||||
#include "ltdl.h"
|
||||
int main (int argc, const void *argv[]) {
|
||||
putchar ('.');
|
||||
putchar (lt_dlinit () ? 'E' : '.');
|
||||
putchar (lt_dlexit () ? 'E' : '.');
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
|
||||
AT_DATA([expout],
|
||||
[[libtoolize: putting auxiliary files in `.'.
|
||||
libtoolize: linking file `./config.guess'
|
||||
libtoolize: linking file `./config.sub'
|
||||
libtoolize: linking file `./install-sh'
|
||||
libtoolize: linking file `./ltmain.sh'
|
||||
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
|
||||
libtoolize: linking file `m4/argz.m4'
|
||||
libtoolize: linking file `m4/libtool.m4'
|
||||
libtoolize: linking file `m4/ltdl.m4'
|
||||
libtoolize: linking file `m4/ltoptions.m4'
|
||||
libtoolize: linking file `m4/ltsugar.m4'
|
||||
libtoolize: linking file `m4/ltversion.m4'
|
||||
libtoolize: linking file `m4/lt~obsolete.m4'
|
||||
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
|
||||
libtoolize: linking file `ltdl/COPYING.LIB'
|
||||
libtoolize: linking file `ltdl/README'
|
||||
libtoolize: linking file `ltdl/argz_.h'
|
||||
libtoolize: linking file `ltdl/argz.c'
|
||||
libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt__private.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt__strl.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt_dlloader.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt_error.h'
|
||||
libtoolize: linking file `ltdl/libltdl/lt_system.h'
|
||||
libtoolize: linking file `ltdl/libltdl/slist.h'
|
||||
libtoolize: linking file `ltdl/loaders/dld_link.c'
|
||||
libtoolize: linking file `ltdl/loaders/dlopen.c'
|
||||
libtoolize: linking file `ltdl/loaders/dyld.c'
|
||||
libtoolize: linking file `ltdl/loaders/load_add_on.c'
|
||||
libtoolize: linking file `ltdl/loaders/loadlibrary.c'
|
||||
libtoolize: linking file `ltdl/loaders/preopen.c'
|
||||
libtoolize: linking file `ltdl/loaders/shl_load.c'
|
||||
libtoolize: linking file `ltdl/lt__alloc.c'
|
||||
libtoolize: linking file `ltdl/lt__dirent.c'
|
||||
libtoolize: linking file `ltdl/lt__strl.c'
|
||||
libtoolize: linking file `ltdl/lt_dlloader.c'
|
||||
libtoolize: linking file `ltdl/lt_error.c'
|
||||
libtoolize: linking file `ltdl/ltdl.c'
|
||||
libtoolize: linking file `ltdl/ltdl.h'
|
||||
libtoolize: creating file `ltdl/ltdl.mk'
|
||||
libtoolize: renaming file `ltdl/Makefile.inc'
|
||||
libtoolize: linking file `ltdl/slist.c'
|
||||
libtoolize: Consider updating to use of `include ltdl/ltdl.mk' in Makefile.am.
|
||||
]])
|
||||
|
||||
AT_DATA([experr],
|
||||
[[libtoolize: Use of `include ltdl/Makefile.inc' is deprecated!
|
||||
]])
|
||||
|
||||
LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], [experr])
|
||||
|
||||
AT_CHECK([test -f ltdl/Makefile.inc])
|
||||
|
||||
LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
|
||||
|
||||
LT_AT_EXEC_CHECK([./old], 0, [[...]])
|
||||
|
||||
AT_CLEANUP
|
Loading…
Reference in New Issue
Block a user