libtool-patches
[Top][All Lists]
Advanced

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

FYI: factor out .la sanity checking [libtool--devo--1.0--patch-279]


From: Gary V. Vaughan
Subject: FYI: factor out .la sanity checking [libtool--devo--1.0--patch-279]
Date: Sun, 24 Oct 2004 17:33:00 +0100 (BST)
User-agent: mailnotify/0.6

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

Applied to HEAD.

  * looking for address@hidden/libtool--devo--1.0--patch-278 to compare with
  * comparing to address@hidden/libtool--devo--1.0--patch-278
  M  ChangeLog
  M  config/ltmain.m4sh
  
  * modified files
  
  Index: Changelog
  from  Noah Misch  <address@hidden>
  
        * config/ltmain.m4sh (func_lalib_p, func_ltwrapper_p): New
        functions that abstract .la sanity checking.
        (func_mode_execute, func_mode_install, func_mode_link)
        (func_mode_uninstall): Use them.
  
  --- orig/config/ltmain.m4sh
  +++ mod/config/ltmain.m4sh
  @@ -572,6 +572,28 @@
     fi
   }
   
  +
  +# func_lalib_p file
  +# True iff FILE is a libtool `.la' library.
  +# This function is only a basic sanity check; it will hardly flush out
  +# determined imposters.
  +func_lalib_p ()
  +{
  +    $SED -e 4q "$1" 2>/dev/null \
  +      | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
  +}
  +
  +
  +# func_ltwrapper_p file
  +# True iff FILE is a libtool wrapper script.
  +# This function is only a basic sanity check; it will hardly flush out
  +# determined imposters.
  +func_ltwrapper_p ()
  +{
  +    func_lalib_p "$1"
  +}
  +
  +
   # func_win32_libid arg
   # return the library type of file 'arg'
   #
  @@ -1416,7 +1438,7 @@
         case $file in
         *.la)
        # Check to see that this really is a libtool archive.
  -     (${SED} -e '2q' $file | $GREP "^# Generated by .*$PACKAGE") >/dev/null 
2>&1 || \
  +     func_lalib_p "$file" \ ||
          func_fatal_help "\`$lib' is not a valid libtool archive"
   
        # Read the libtool library.
  @@ -1483,7 +1505,7 @@
         -*) ;;
         *)
        # Do a test to see if this is really a libtool program.
  -     if (${SED} -e '4q' $file | $GREP "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then
  +     if func_lalib_p "$file"; then
          # If there is no directory component, then add one.
          case $file in
          */* | *\\*) . $file ;;
  @@ -1743,7 +1765,7 @@
   
         *.la)
        # Check to see that this really is a libtool archive.
  -     (${SED} -e '2q' $file | $GREP "^# Generated by ltmain.sh ") >/dev/null 
2>&1 || \
  +     func_lalib_p "$file" || \
          func_fatal_help "\`$file' is not a valid libtool archive"
   
        library_names=
  @@ -1914,7 +1936,7 @@
            wrapper=$file
            ;;
        esac
  -     if (${SED} -e '4q' $wrapper | $GREP "^# Generated by 
.*$PACKAGE")>/dev/null 2>&1; then
  +     if func_ltwrapper_p "$wrapper"; then
          notinst_deplibs=
          relink_command=
   
  @@ -2267,7 +2289,7 @@
              # A libtool-controlled object.
   
              # Check to see that this really is a libtool object.
  -           if (${SED} -e '2q' $arg | $GREP "^# Generated by ltmain.sh ") 
>/dev/null 2>&1; then
  +           if func_lalib_p "$arg"; then
                pic_object=
                non_pic_object=
   
  @@ -2760,7 +2782,7 @@
        # A libtool-controlled object.
   
        # Check to see that this really is a libtool object.
  -     if (${SED} -e '2q' $arg | $GREP "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then
  +     if func_lalib_p "$arg"; then
          pic_object=
          non_pic_object=
   
  @@ -3098,8 +3120,7 @@
            if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
              case " $predeps $postdeps " in
              *" $deplib "*)
  -             if (${SED} -e '2q' $lib |
  -                 $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  +             if func_lalib_p "$lib"; then
                  library_names=
                  old_library=
                  case $lib in
  @@ -3268,10 +3289,8 @@
        fi
   
        # Check to see that this really is a libtool archive.
  -     if (${SED} -e '2q' $lib | $GREP "^# Generated by ltmain.sh ") 
>/dev/null 2>&1; then :
  -     else
  +     func_lalib_p "$lib" || \
          func_fatal_error "\`$lib' is not a valid libtool archive"
  -     fi
   
        ladir=`$ECHO "X$lib" | $Xsed -e 's%/[[^/]]*$%%'`
        test "X$ladir" = "X$lib" && ladir="."
  @@ -6461,7 +6480,7 @@
         case $name in
         *.la)
        # Possibly a libtool archive, so verify it.
  -     if (${SED} -e '2q' $file | $GREP "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then
  +     if func_lalib_p "$file"; then
          . $dir/$name
   
          # Delete the libtool libraries and symlinks.
  @@ -6508,7 +6527,7 @@
   
         *.lo)
        # Possibly a libtool object, so verify it.
  -     if (${SED} -e '2q' $file | $GREP "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then
  +     if func_lalib_p "$file"; then
   
          # Read the .lo file
          . $dir/$name
  @@ -6540,7 +6559,7 @@
            ;;
          esac
          # Do a test to see if this is a libtool program.
  -       if (${SED} -e '4q' $file | $GREP "^# Generated by .*$PACKAGE") 
>/dev/null 2>&1; then
  +       if func_ltwrapper_p "$file"; then
            relink_command=
            . $dir/$noexename
   
  
  
  
- -- 
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 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBe9k7FRMICSmD1gYRAjbBAJ47t3UEX4CJf+DlFKAKD/ztzacD2gCdEAHM
ygGPCUVlI1tMdaOWORzsUPQ=
=WbdZ
-----END PGP SIGNATURE-----




reply via email to

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