libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: 333-gary-refactor-LTDL_INIT.patch


From: Ralf Wildenhues
Subject: Re: FYI: 333-gary-refactor-LTDL_INIT.patch
Date: Thu, 17 Jan 2008 06:36:21 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* Gary V. Vaughan wrote on Thu, Jan 17, 2008 at 06:20:31AM CET:
> On 17 Jan 2008, at 03:37, Ralf Wildenhues wrote:
> >OK to apply this patch to fix it and some other cases?
> 
> Yes please.

Done as below, thanks.

> Our libtoolize test coverage is still extremely poor.  When you commit
> could you also please add a TODO for writing a test case that adds the
> libtool macros to aclocal.m4?

Yep.

Cheers,
Ralf

2008-01-17  Ralf Wildenhues  <address@hidden>

        * libtoolize.m4sh (func_scan_files): Avoid matching our own
        macro code when scanning configure.ac and aclocal.m4.
        Don't produce spurious output if AC_PROG_RANLIB is found.
        * tests/old-m4-iface.at (AM_PROG_LIBTOOL): Add a (weak) check
        that we don't match our own macro code when searching for user
        code calling us.
        * TODO: Updated.

Index: TODO
===================================================================
RCS file: /cvsroot/libtool/libtool/TODO,v
retrieving revision 1.73
diff -u -r1.73 TODO
--- TODO        25 Mar 2007 12:12:42 -0000      1.73
+++ TODO        17 Jan 2008 05:35:45 -0000
@@ -103,6 +103,8 @@
   processes per copied file, a list of files to copy is built and all
   files copied with a single pair of tar processes.
 
+* Write test case that adds libtool macros to aclocal.m4.
+
 
 2. In the future
 ================
@@ -278,7 +280,7 @@
   it easier to add new platforms.
 
 -- 
-  Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+  Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
   Written by Gary V. Vaughan, 2004
 
   This file is part of GNU Libtool.
Index: libtoolize.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libtoolize.m4sh,v
retrieving revision 1.64
diff -u -r1.64 libtoolize.m4sh
--- libtoolize.m4sh     6 Jan 2008 16:33:30 -0000       1.64
+++ libtoolize.m4sh     17 Jan 2008 05:35:45 -0000
@@ -418,14 +418,18 @@
            s,^.*LT_CONFIG_LTDL_DIR([[   ]*\([^])]*\).*$,ac_ltdldir=\1,
            p
        }
+       /\@<:@A[CM]_PROG_LIBTOOL/d
        /A[CM]_PROG_LIBTOOL/ {
            s,^.*$,seen_libtool=:,
            p
        }
+       /the.*option into.*LT_INIT.*parameter/d
+       /\@<:@LT_INIT/d
        /LT_INIT/                {
            s,^.*$,seen_libtool=:,
            p
        }
+       /\@<:@LTDL_INIT/d
        /LTDL_INIT/          {
            s,^.*LTDL_INIT([[   ]*\([^])]*\).*$,ltdl_options="\1",
            s,^.*LTDL_INIT[     ]*$,seen_ltdl=:,
@@ -960,7 +964,7 @@
     else
       # Don't trace for this, we're just checking the user didn't invoke it
       # directly from configure.ac.
-      $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB &&
+      $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB 
>/dev/null &&
         func_echo "\`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT'"
     fi
 
Index: tests/old-m4-iface.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/old-m4-iface.at,v
retrieving revision 1.14
diff -u -r1.14 old-m4-iface.at
--- tests/old-m4-iface.at       12 Jan 2008 14:07:02 -0000      1.14
+++ tests/old-m4-iface.at       17 Jan 2008 05:35:45 -0000
@@ -86,6 +86,17 @@
 
 LT_AT_EXEC_CHECK([./old], 0, [Hello, World!])
 
+# Now, test that libtoolize doesn't mistakenly think the user called
+# any libtool macros if in fact she didn't.
+sed '/AM_PROG_LIBTOOL/d' configure.in >configure.int
+mv -f configure.int configure.in
+AT_CHECK([$LIBTOOLIZE -n], [0], [stdout], [stderr])
+# ensure no shell errors:
+AT_CHECK([grep -v "^libtoolize: " stderr], [1])
+AT_CHECK([grep "Remember to add.*LT_INIT.*to configure.in" stdout], [0], 
[ignore])
+AT_CHECK([grep "Consider adding.*LT_WITH_LTDL" stdout], [1])
+AT_CHECK([grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout], [1])
+
 AT_CLEANUP
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]