From: Gary V. Vaughan Date: Wed, 26 Oct 2005 10:36:31 +0000 (+0000) Subject: * libtoolize.m4sh: Don't use func_serial_update as a copy X-Git-Tag: release-2-1b~450 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58f074beb4e276b38be339c83b91092fc7cf931d;p=thirdparty%2Flibtool.git * 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). --- diff --git a/ChangeLog b/ChangeLog index d0356d252..8c7adc205 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-10-26 Gary V. Vaughan + + * 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 * libtoolize.m4sh: Move the consistency checks... diff --git a/libtoolize.m4sh b/libtoolize.m4sh index f35143c39..38b35eb12 100644 --- a/libtoolize.m4sh +++ b/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