mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
* libtoolize.m4sh (func_fixup_Makefile_inc): New function.
(main): Call it in nonrecursive mode to mangle Makefile.inc. * tests/nonrecursive.at: adjusted to test this.
This commit is contained in:
parent
33c0290e19
commit
8a48a49aa5
@ -1,3 +1,9 @@
|
||||
2005-12-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* libtoolize.m4sh (func_fixup_Makefile_inc): New function.
|
||||
(main): Call it in nonrecursive mode to mangle Makefile.inc.
|
||||
* tests/nonrecursive.at: adjusted to test this.
|
||||
|
||||
2005-12-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Basic support for PIE (position-independent executables).
|
||||
|
@ -359,6 +359,32 @@ func_copy_some_files ()
|
||||
IFS="$my_save_IFS"
|
||||
}
|
||||
|
||||
# func_fixup_Makefile_inc srcfile srcdir destdir
|
||||
func_fixup_Makefile_inc ()
|
||||
{
|
||||
my_filename="$1"
|
||||
my_srcdir="$2"
|
||||
my_destdir="$3"
|
||||
|
||||
repl=$ltdldir
|
||||
repl_uscore=`$ECHO "X$repl" | $Xsed -e 's,[[/.+-]],_,g'`
|
||||
$RM "$my_destdir/$my_filename" 2>/dev/null
|
||||
$opt_quiet || func_echo "creating file \`$my_destdir/$my_filename'"
|
||||
if $opt_dry_run; then :;
|
||||
else
|
||||
$SED "\
|
||||
s,libltdl_,@repl_uscore@_,
|
||||
s,libltdl/,@repl@/,
|
||||
s,: libltdl/,: @repl@/,
|
||||
s,\\\$(libltdl_,\$(@repl_uscore@_,
|
||||
s,)/libltdl ,)/@repl@ ,
|
||||
s,@repl_uscore@,${repl_uscore},g
|
||||
s,@repl@,${repl},g
|
||||
" < "$my_srcdir/$my_filename" > "$my_destdir/$my_filename" ||
|
||||
func_fatal_error "cannot create $my_destdir/$my_filename"
|
||||
fi
|
||||
}
|
||||
|
||||
# func_scan_files
|
||||
# Scan configure.(ac|in) and aclocal.m4 (if present) for use of libltdl
|
||||
# and libtool. Possibly running some of these tools if necessary.
|
||||
@ -1069,11 +1095,14 @@ func_nonemptydir_p ()
|
||||
# For recursive ltdl modes, copy a suitable Makefile.{am,inc}:
|
||||
case $ltdl_mode in
|
||||
recursive) pkgltdl_files="Makefile.am:$pkgltdl_files" ;;
|
||||
nonrecursive) pkgltdl_files="Makefile.inc:$pkgltdl_files" ;;
|
||||
esac
|
||||
|
||||
func_copy_some_files "$pkgltdl_files" "$pkgltdldir/libltdl" "$ltdldir"
|
||||
|
||||
case $ltdl_mode in
|
||||
nonrecursive) func_fixup_Makefile_inc "Makefile.inc" "$pkgltdldir/libltdl" "$ltdldir" ;;
|
||||
esac
|
||||
|
||||
# Unless we share CONFIG_MACRO_DIR with our parent project,
|
||||
# copy macros here.
|
||||
if test "$ltdldir/m4" != "$m4dir"; then
|
||||
|
@ -23,10 +23,10 @@ AT_BANNER([Nonrecursive Automake Libltdl.])
|
||||
m4_pushdef([_LTDL_SETUP],
|
||||
[AT_DATA([configure.ac],
|
||||
[[AC_INIT([subdirectory-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
|
||||
LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
|
||||
AC_CONFIG_AUX_DIR([libltdl/config])
|
||||
AC_CONFIG_MACRO_DIR([libltdl/m4])
|
||||
AC_CONFIG_LIBOBJ_DIR([libltdl])
|
||||
LT_CONFIG_LTDL_DIR([ltdl], [nonrecursive])
|
||||
AC_CONFIG_AUX_DIR([ltdl/config])
|
||||
AC_CONFIG_MACRO_DIR([ltdl/m4])
|
||||
AC_CONFIG_LIBOBJ_DIR([ltdl])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
@ -37,7 +37,7 @@ AC_OUTPUT
|
||||
]])
|
||||
|
||||
AT_DATA([Makefile.am],
|
||||
[[ACLOCAL_AMFLAGS = -I libltdl/m4
|
||||
[[ACLOCAL_AMFLAGS = -I ltdl/m4
|
||||
BUILT_SOURCES =
|
||||
|
||||
AM_CPPFLAGS =
|
||||
@ -53,7 +53,7 @@ EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
MOSTLYCLEANFILES =
|
||||
|
||||
include libltdl/Makefile.inc
|
||||
include ltdl/Makefile.inc
|
||||
|
||||
foo_la_LDFLAGS = -module -avoid-version
|
||||
foo_la_SOURCES = foo.c
|
||||
@ -71,16 +71,16 @@ AT_SETUP([compiling softlinked libltdl])
|
||||
_LTDL_SETUP
|
||||
|
||||
LT_AT_LIBTOOLIZE([--ltdl])
|
||||
AT_CHECK([if test -f libltdl/configure.ac; then false; fi])
|
||||
AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
|
||||
|
||||
# Support vanilla autoconf-2.59 & automake-1.9.6
|
||||
for file in argz.c lt__dirent.c lt__strl.c; do
|
||||
cp libltdl/$file $file
|
||||
cp ltdl/$file $file
|
||||
done
|
||||
|
||||
LT_AT_BOOTSTRAP([ignore], [-I libltdl/m4], [ignore], [--add-missing --copy])
|
||||
LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [ignore], [--add-missing --copy])
|
||||
|
||||
AT_CHECK([test -f libltdl/libltdlc.la])
|
||||
AT_CHECK([test -f ltdl/libltdlc.la])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@ -94,16 +94,16 @@ AT_SETUP([compiling copied libltdl])
|
||||
_LTDL_SETUP
|
||||
|
||||
LT_AT_LIBTOOLIZE([--copy --ltdl])
|
||||
AT_CHECK([if test -f libltdl/configure.ac; then false; fi])
|
||||
AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
|
||||
|
||||
# Support vanilla autoconf-2.59 & automake-1.9.6
|
||||
for file in argz.c lt__dirent.c lt__strl.c; do
|
||||
cp libltdl/$file $file
|
||||
cp ltdl/$file $file
|
||||
done
|
||||
|
||||
LT_AT_BOOTSTRAP([ignore], [-I libltdl/m4], [ignore], [--add-missing --copy])
|
||||
LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [ignore], [--add-missing --copy])
|
||||
|
||||
AT_CHECK([test -f libltdl/libltdlc.la])
|
||||
AT_CHECK([test -f ltdl/libltdlc.la])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@ -119,14 +119,14 @@ _LTDL_SETUP
|
||||
prefix=`pwd`/_inst
|
||||
|
||||
LT_AT_LIBTOOLIZE([--copy --ltdl])
|
||||
AT_CHECK([if test -f libltdl/configure.ac; then false; fi])
|
||||
AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
|
||||
|
||||
# Support vanilla autoconf-2.59 & automake-1.9.6
|
||||
for file in argz.c lt__dirent.c lt__strl.c; do
|
||||
cp libltdl/$file $file
|
||||
cp ltdl/$file $file
|
||||
done
|
||||
|
||||
LT_AT_BOOTSTRAP([ignore], [-I libltdl/m4], [ignore], [--add-missing --copy],
|
||||
LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [ignore], [--add-missing --copy],
|
||||
[], [--enable-ltdl-install --prefix=$prefix], [all install])
|
||||
|
||||
AT_CHECK([test -f $prefix/lib/libltdl.la])
|
||||
|
Loading…
Reference in New Issue
Block a user