libtool-patches
[Top][All Lists]
Advanced

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

Re: [Patch] libtoolize weirdness (after 285-gary)


From: Gary V. Vaughan
Subject: Re: [Patch] libtoolize weirdness (after 285-gary)
Date: Tue, 25 Oct 2005 15:10:40 +0100
User-agent: quilt/0.42-1

Okay to commit?

Fixes a dumb bug, where the serial numbers of m4_included files are
looked up incorrectly.  Fixes a dumber bug, where the serial numbers
of copied-to-aclocal.m4-verbatim were looked up using clairvoyance.

 libtoolize.m4sh |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)
Index: libtool--devo--1.0/ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * libtoolize.m4sh: Don't use func_serial_update as a copy
        function for libtool m4 files with no macro_regex.  If the
        files are copied directly into aclocal.m4, because
        AC_CONFIG_MACRO_DIR isn't set for example, there is no way
        to tell what serial number goes with what source file.
        (func_serial_update): For future-proofing, only make the second
        serial number check if the destination file wasn't m4_included
        into aclocal.m4 (and hence updated automatically by the cat of
        copying a new version to the dest directory).

Index: libtool--devo--1.0/libtoolize.m4sh
===================================================================
--- libtool--devo--1.0.orig/libtoolize.m4sh
+++ libtool--devo--1.0/libtoolize.m4sh
@@ -677,13 +677,18 @@ func_serial_update ()
     # Do this after the copy for hand maintained `aclocal.m4', incase
     # it has `m4_include([DESTFILE])', so the copy effectively already
     # updated `aclocal.m4'.
-    if test -f aclocal.m4; then
-      func_serial_max \
-          "$my_src_serial" `func_serial aclocal.m4 "$my_macro_regex"`
-      test "X$my_src_serial" = "X$func_serial_max_result" \
-         && func_echo "You should add the contents of \`$my_destfile' to 
\`aclocal.m4'."
-    fi
-
+    my_included_files=`func_included_files aclocal.m4`
+    case `echo " "$my_included_files" "` in
+      *" $my_destfile "*) ;;
+      *)
+        if test -f aclocal.m4; then
+          func_serial_max \
+              "$my_src_serial" `func_serial aclocal.m4 "$my_macro_regex"`
+          test "X$my_src_serial" = "X$func_serial_max_result" \
+             && func_echo "You should add the contents of \`$my_destfile' to 
\`aclocal.m4'."
+        fi
+        ;;
+    esac
     return $my_return_status
 }
 
@@ -1041,8 +1046,7 @@ func_nonemptydir_p ()
       func_verbose "Not copying \`$m4dir/ltdl.m4', libltdl not used."
     fi
 
-    func_copy_some_files "$pkgmacro_files" "$aclocaldir" \
-      "$m4dir" func_serial_update
+    func_copy_some_files "$pkgmacro_files" "$aclocaldir" "$m4dir"
   fi
 
   $opt_quiet || func_check_macros
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook




reply via email to

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