]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtoolize.m4sh: Don't use func_serial_update as a copy
authorGary V. Vaughan <gary@gnu.org>
Wed, 26 Oct 2005 10:36:31 +0000 (10:36 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 26 Oct 2005 10:36:31 +0000 (10:36 +0000)
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).

ChangeLog
libtoolize.m4sh

index d0356d252daa3dd48f6dcc72234512fb962284a5..8c7adc205542b5b967f644559e61910fdff0d348 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-10-26  Gary V. Vaughan  <gary@gnu.org>
+
+       * 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).
+
 2005-10-26  Gary V. Vaughan  <gary@gnu.org>
 
        * libtoolize.m4sh: Move the consistency checks...
index f35143c398e42be38a040901d16662ca96467e48..38b35eb127738b7119338d426844b0e6d501f650 100644 (file)
@@ -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