[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-
From: |
Ralf Wildenhues |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-182-gbbedcb4 |
Date: |
Sat, 20 Sep 2008 10:15:03 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=bbedcb43dc37f7e937f1a67e266677d88cf5ff9b
The branch, master has been updated
via bbedcb43dc37f7e937f1a67e266677d88cf5ff9b (commit)
from e32096193cfdff5a7e93bba8947c2641e13d8ff7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bbedcb43dc37f7e937f1a67e266677d88cf5ff9b
Author: Ralf Wildenhues <address@hidden>
Date: Sat Sep 20 12:12:42 2008 +0200
Fix -rpath arguments for nobase_*_LTLIBRARIES.
* automake.in (handle_ltlibraries): New hash %instsubdirs to
track the dirname of nobase ltlibraries, and tack it onto the
end of the -rpath argument. Also, fix the warning about ltlibs
installed in multiple locations to fit a bit better.
* tests/pr300-ltlib.test: Expose this bug here.
* tests/ltinstloc.test: New test.
* tests/Makefile.am: Update.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 +++++++
NEWS | 3 ++
automake.in | 18 +++++++++++--
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/ltinstloc.test | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/pr300-ltlib.test | 13 +++++++--
7 files changed, 105 insertions(+), 6 deletions(-)
create mode 100755 tests/ltinstloc.test
diff --git a/ChangeLog b/ChangeLog
index f481274..ba25fcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2008-09-20 Ralf Wildenhues <address@hidden>
+ Fix -rpath arguments for nobase_*_LTLIBRARIES.
+ * automake.in (handle_ltlibraries): New hash %instsubdirs to
+ track the dirname of nobase ltlibraries, and tack it onto the
+ end of the -rpath argument. Also, fix the warning about ltlibs
+ installed in multiple locations to fit a bit better.
+ * tests/pr300-ltlib.test: Expose this bug here.
+ * tests/ltinstloc.test: New test.
+ * tests/Makefile.am: Update.
+ * NEWS: Update.
+
Man pages for automake and aclocal.
* configure.ac (HELP2MAN): New substitution.
* doc/Makefile.am (dist_man1_MANS, MAINTAINERCLEANFILES)
diff --git a/NEWS b/NEWS
index dac6a9e..9c4dc91 100644
--- a/NEWS
+++ b/NEWS
@@ -81,6 +81,9 @@ Bugs fixed in 1.10a:
- Fix aix dependency tracking for libtool objects.
+ - For nobase_*_LTLIBRARIES with nonempty directory components, the
+ correct `-rpath' argument is used now.
+
* Bugs introduced by 1.10:
- Fix output of dummy dependency files in presence of post-processed
diff --git a/automake.in b/automake.in
index baaac96..54f6865 100755
--- a/automake.in
+++ b/automake.in
@@ -2626,13 +2626,20 @@ sub handle_ltlibraries
}
my %instdirs = ();
+ my %instsubdirs = ();
my %instconds = ();
my %liblocations = (); # Location (in Makefile.am) of each library.
foreach my $key (@prefix)
{
# Get the installation directory of each library.
- (my $dir = $key) =~ s/^nobase_//;
+ my $dir = $key;
+ my $strip_subdir = 1;
+ if ($dir =~ /^nobase_/)
+ {
+ $dir =~ s/^nobase_//;
+ $strip_subdir = 0;
+ }
my $var = rvar ($key . '_LTLIBRARIES');
# We reject libraries which are installed in several places
@@ -2644,6 +2651,9 @@ sub handle_ltlibraries
my ($var, $val, $cond, $full_cond) = @_;
my $hcond = $full_cond->human;
my $where = $var->rdef ($cond)->location;
+ my $ldir = '';
+ $ldir = '/' . dirname ($val)
+ if (!$strip_subdir);
# A library cannot be installed in different directory
# in overlapping conditions.
if (exists $instconds{$val})
@@ -2654,8 +2664,7 @@ sub handle_ltlibraries
if ($msg)
{
error ($where, $msg, partial => 1);
-
- my $dirtxt = "installed in `$dir'";
+ my $dirtxt = "installed " . ($strip_subdir ? "in" : "below")
. " `$dir'";
$dirtxt = "built for `$dir'"
if $dir eq 'EXTRA' || $dir eq 'noinst' || $dir eq 'check';
my $dircond =
@@ -2686,6 +2695,7 @@ sub handle_ltlibraries
$instconds{$val} = new Automake::DisjConditions;
}
$instdirs{$val}{$full_cond} = $dir;
+ $instsubdirs{$val}{$full_cond} = $ldir;
$liblocations{$val}{$full_cond} = $where;
$instconds{$val} = $instconds{$val}->merge ($full_cond);
},
@@ -2789,6 +2799,8 @@ sub handle_ltlibraries
else
{
$val = ('-rpath $(' . $instdirs{$onelib}{$rcond} . 'dir)');
+ $val .= $instsubdirs{$onelib}{$rcond}
+ if defined $instsubdirs{$onelib}{$rcond};
}
if ($rcond->true)
{
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7146770..4445c40 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -376,6 +376,7 @@ ltcond.test \
ltcond2.test \
ltconv.test \
ltdeps.test \
+ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
lzma.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 1d90536..4cd51e7 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -528,6 +528,7 @@ ltcond.test \
ltcond2.test \
ltconv.test \
ltdeps.test \
+ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
lzma.test \
diff --git a/tests/ltinstloc.test b/tests/ltinstloc.test
new file mode 100755
index 0000000..d6122fd
--- /dev/null
+++ b/tests/ltinstloc.test
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Copyright (C) 2008 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 3, 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. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for libtool errors for multiple install locations, esp. with nobase.
+
+
+required='libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AM_CONDITIONAL([COND], [:])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+if COND
+lib_LTLIBRARIES = liba1.la sub/liba2.la
+#else
+pkglib_LTLIBRARIES = liba1.la
+nobase_lib_LTLIBRARIES = sub/liba2.la
+endif
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+AUTOMAKE_fails --add-missing
+
+cat >expected <<'END'
+configure.in:5: installing `./config.guess'
+configure.in:5: installing `./config.sub'
+Makefile.am:5: sub/liba2.la multiply defined in condition COND
+Makefile.am:5: `sub/liba2.la' should be installed below `lib' in condition
COND ...
+Makefile.am:2: ... and should also be installed in `lib' in condition COND.
+Makefile.am:4: liba1.la multiply defined in condition COND
+Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
+Makefile.am:2: ... and should also be installed in `lib' in condition COND.
+Makefile.am:2: Libtool libraries can be built for only one destination.
+END
+
+diff stderr expected
+
+sed 's/#//' < Makefile.am > t
+mv -f t Makefile.am
+
+$AUTOMAKE
+grep ' -rpath \$(libdir)/sub' Makefile.in
+:
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index c864d44..99c03da 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2008 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
@@ -48,12 +48,19 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
./configure --prefix "`pwd`/inst"
-$MAKE
+$MAKE >stdout
+cat stdout
+
+grep 'liba.la .*-rpath .*lib' stdout
+grep 'liba.la .*-rpath .*lib/subdir' stdout && Exit 1
+grep 'libb.la .*-rpath .*lib/subdir' stdout
test -f subdir/liba.la
test -f subdir/libb.la
-$MAKE install
+$MAKE install 2>stderr
+cat stderr >&2
+grep 'remember.*--finish' stderr && Exit 1
test -f inst/lib/liba.la
test -f inst/lib/subdir/libb.la
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-182-gbbedcb4,
Ralf Wildenhues <=