libtool-patches
[Top][All Lists]
Advanced

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

FYI: diagnose hand maintained aclocal updates [305]


From: Gary V. Vaughan
Subject: FYI: diagnose hand maintained aclocal updates [305]
Date: Tue, 1 Nov 2005 14:28:52 +0000 (GMT)
User-agent: mailnotify/0.7

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied to HEAD.

  * looking for address@hidden/libtool--devo--1.0--patch-346 to compare with
  * comparing to address@hidden/libtool--devo--1.0--patch-346
  M  libtoolize.m4sh
  M  tests/libtoolize.at
  M  ChangeLog
  
  * modified files
  
  Index: Changelog
  from  Gary V. Vaughan  <address@hidden>
        * libtoolize.m4sh: Use serial tags to locate the correct serial
        numbers when deciding whether to update.
        (func_serial): Allow for macro_regex argument to be originating
        file name.
        (func_serial_update): Use NL2SP to flatten list of extracted
        m4_include files.
        * tests/libtoolize.at: More tests for old-style verbatim copying
        of macros into aclocal.m4.
  
  --- orig/libtoolize.m4sh
  +++ mod/libtoolize.m4sh
  @@ -566,6 +566,8 @@
       my_serial=
       for my_file in `func_included_files "$my_filename"`; do
         if test -z "$my_macro_regex" ||
  +         test "$my_filename" = aclocal.m4 ||
  +         test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` ||
            func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_file"
         then
           my_serial=`$SED -e "$my_sed_serial" "$my_file"`
  @@ -716,8 +718,15 @@
       # it has `m4_include([DESTFILE])', so the copy effectively already
       # updated `aclocal.m4'.
       my_included_files=`func_included_files aclocal.m4`
  -    case `echo " "$my_included_files" "` in
  +    case `echo " $my_included_files " | $NL2SP` in
  +
  +      # Skip included files:
         *" $my_destfile "*) ;;
  +
  +      # Otherwise compare to aclocal.m4 serial number (func_serial
  +      # returns 0 for older macro serial numbers before we provided
  +      # serial tags, so the update message will be correctly given
  +      # if aclocal.m4 contains an untagged --i.e older-- macro file):
         *)
           if test -f aclocal.m4; then
             func_serial_max \
  @@ -851,7 +860,7 @@
        func_echo "and rerunning libtoolize."
         fi
       elif test -z "$m4dir"; then
  -      if test "$ltdldir/m4" != "$m4dir"; then
  +      if $opt_ltdl && test "$ltdldir/m4" != "$m4dir"; then
        acmacrodir="$ltdldir/m4"
         else
        acmacrodir="$aclocaldir"
  @@ -1101,8 +1110,13 @@
         func_verbose "Not copying \`$m4dir/ltdl.m4', libltdl not used."
       fi
   
  -    func_copy_some_files "$pkgmacro_files" "$aclocaldir" \
  -      "$m4dir" func_serial_update
  +    my_save_IFS="$IFS"
  +    IFS=:
  +    for file in $pkgmacro_files; do
  +      IFS="$my_save_IFS"
  +      func_serial_update $file "$aclocaldir" "$m4dir" "$file"
  +    done
  +    IFS="$my_save_IFS"
     fi
   
     $opt_quiet || func_check_macros
  
  
  --- orig/tests/libtoolize.at
  +++ mod/tests/libtoolize.at
  @@ -46,7 +46,7 @@
   # This file has a very high serial number, and should be left unchanged
   # until --force is passed.
   AT_DATA([m4/ltoptions.m4], [[
  -# serial 99999
  +# serial 99999 ltoptions.m4
   ]])
   
   test -d config || { rm -f config && mkdir config; }
  @@ -350,3 +350,126 @@
   LT_AT_CHECK_LIBTOOLIZE([--ltdl], 0, expout)
   
   AT_CLEANUP
  +
  +
  +## ------------------------------------------------------ ##
  +## Creating an aclocal.m4 without in-tree libtool macros. ##
  +## ------------------------------------------------------ ##
  +
  +AT_SETUP([upgrading verbatim style aclocal.m4])
  +
  +AT_DATA([configure.ac],
  +[[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
  +AC_CONFIG_AUX_DIR([config])
  +LT_INIT
  +AC_OUTPUT
  +]])
  +
  +[cat >expout <<EOF
  +libtoolize: putting files in AC_CONFIG_AUX_DIR, \`config'.
  +libtoolize: copying file \`config/ltmain.sh'
  +libtoolize: You should add the contents of the following files to 
\`aclocal.m4':
  +libtoolize:   \`$_lt_pkgdatadir/libltdl/m4/libtool.m4'
  +libtoolize:   \`$_lt_pkgdatadir/libltdl/m4/ltoptions.m4'
  +libtoolize:   \`$_lt_pkgdatadir/libltdl/m4/ltversion.m4'
  +libtoolize:   \`$_lt_pkgdatadir/libltdl/m4/ltsugar.m4'
  +EOF]
  +
  +LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
  +
  +
  +## --------------------------------------- ##
  +## Upgrading a hand maintained aclocal.m4. ##
  +## --------------------------------------- ##
  +
  +AT_DATA([configure.ac],
  +[[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
  +AC_CONFIG_AUX_DIR([config])
  +AC_CONFIG_MACRO_DIR([m4])
  +LT_INIT
  +AC_OUTPUT
  +]])
  +
  +AT_DATA([aclocal.m4],
  +[[# This should need upgrading:
  +# serial 25 LT_INIT
  +AC_DEFUN([LT_INIT],
  +[blah])
  +
  +# This is newer than the upgrade version:
  +# serial 99999 ltoptions.m4
  +
  +# This is older than the upgrade version:
  +# serial 1 ltversion.m4
  +]])
  +
  +AT_DATA([expout],
  +[[libtoolize: putting files in AC_CONFIG_AUX_DIR, `config'.
  +libtoolize: `config/ltmain.sh' is already up to date.
  +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
  +libtoolize: copying file `m4/libtool.m4'
  +libtoolize: copying file `m4/argz.m4'
  +libtoolize: You should add the contents of `m4/argz.m4' to `aclocal.m4'.
  +libtoolize: copying file `m4/ltoptions.m4'
  +libtoolize: copying file `m4/ltsugar.m4'
  +libtoolize: You should add the contents of `m4/ltsugar.m4' to `aclocal.m4'.
  +libtoolize: copying file `m4/ltversion.m4'
  +libtoolize: You should add the contents of `m4/ltversion.m4' to `aclocal.m4'.
  +]])
  +
  +LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
  +
  +
  +## ------------------------------------------- ##
  +## Upgrading an aclocal maintained aclocal.m4. ##
  +## ------------------------------------------- ##
  +
  +LT_AT_ACLOCAL([-I m4])
  +
  +# This file should be upgraded.
  +AT_DATA([m4/libtool.m4], [[
  +# serial 25 LT_INIT
  +AC_DEFUN([LT_INIT])
  +]])
  +
  +# This file has a very high serial number, and should be left unchanged.
  +AT_DATA([m4/ltoptions.m4], [[
  +# serial 99999 ltoptions.m4
  +]])
  +
  +AT_DATA([expout],
  +[[libtoolize: putting files in AC_CONFIG_AUX_DIR, `config'.
  +libtoolize: `config/ltmain.sh' is already up to date.
  +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
  +libtoolize: copying file `m4/libtool.m4'
  +libtoolize: `m4/argz.m4' is already up to date.
  +libtoolize: You should add the contents of `m4/argz.m4' to `aclocal.m4'.
  +libtoolize: `m4/ltsugar.m4' is already up to date.
  +libtoolize: `m4/ltversion.m4' is already up to date.
  +]])
  +
  +AT_DATA([experr],
  +[[libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
  +]])
  +
  +LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout, experr)
  +
  +## ----------------------------------------------------------- ##
  +## Now, a forced update to downgrade files with newer serials. ##
  +## ----------------------------------------------------------- ##
  +
  +AT_DATA(expout,
  +[[libtoolize: putting files in AC_CONFIG_AUX_DIR, `config'.
  +libtoolize: copying file `config/ltmain.sh'
  +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
  +libtoolize: copying file `m4/libtool.m4'
  +libtoolize: copying file `m4/argz.m4'
  +libtoolize: You should add the contents of `m4/argz.m4' to `aclocal.m4'.
  +libtoolize: copying file `m4/ltoptions.m4'
  +libtoolize: copying file `m4/ltsugar.m4'
  +libtoolize: copying file `m4/ltversion.m4'
  +]])
  +
  +LT_AT_CHECK_LIBTOOLIZE([--copy --force], 0, expout)
  +
  +AT_CLEANUP
  
  
  
- -- 
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
_________________________________________________________
This patch notification generated by tlaapply version 1.0
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDZ3ujFRMICSmD1gYRAr0GAJ0VR91XGiQ9wqd8grFUX9LPiA/t5gCfRhgw
wwSCIZeW0w8o6d/IpVZA/z0=
=6r7U
-----END PGP SIGNATURE-----




reply via email to

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