mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-12-27 07:09:26 +08:00
* 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.
This commit is contained in:
parent
17e61a7564
commit
4d01904ca5
@ -1,3 +1,10 @@
|
|||||||
|
2004-10-24 Noah Misch <noah@cs.caltech.edu>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2004-10-24 Gary V. Vaughan <gary@gnu.org>
|
2004-10-24 Gary V. Vaughan <gary@gnu.org>
|
||||||
|
|
||||||
* config/ltmain.m4sh (opt_silent): Whether --silent was given.
|
* config/ltmain.m4sh (opt_silent): Whether --silent was given.
|
||||||
|
@ -572,6 +572,28 @@ _LT_EOF
|
|||||||
fi
|
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
|
# func_win32_libid arg
|
||||||
# return the library type of file 'arg'
|
# return the library type of file 'arg'
|
||||||
#
|
#
|
||||||
@ -1416,7 +1438,7 @@ func_mode_execute ()
|
|||||||
case $file in
|
case $file in
|
||||||
*.la)
|
*.la)
|
||||||
# Check to see that this really is a libtool archive.
|
# 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"
|
func_fatal_help "\`$lib' is not a valid libtool archive"
|
||||||
|
|
||||||
# Read the libtool library.
|
# Read the libtool library.
|
||||||
@ -1483,7 +1505,7 @@ func_mode_execute ()
|
|||||||
-*) ;;
|
-*) ;;
|
||||||
*)
|
*)
|
||||||
# Do a test to see if this is really a libtool program.
|
# 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.
|
# If there is no directory component, then add one.
|
||||||
case $file in
|
case $file in
|
||||||
*/* | *\\*) . $file ;;
|
*/* | *\\*) . $file ;;
|
||||||
@ -1743,7 +1765,7 @@ func_mode_install ()
|
|||||||
|
|
||||||
*.la)
|
*.la)
|
||||||
# Check to see that this really is a libtool archive.
|
# 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"
|
func_fatal_help "\`$file' is not a valid libtool archive"
|
||||||
|
|
||||||
library_names=
|
library_names=
|
||||||
@ -1914,7 +1936,7 @@ func_mode_install ()
|
|||||||
wrapper=$file
|
wrapper=$file
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if (${SED} -e '4q' $wrapper | $GREP "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
|
if func_ltwrapper_p "$wrapper"; then
|
||||||
notinst_deplibs=
|
notinst_deplibs=
|
||||||
relink_command=
|
relink_command=
|
||||||
|
|
||||||
@ -2267,7 +2289,7 @@ func_mode_link ()
|
|||||||
# A libtool-controlled object.
|
# A libtool-controlled object.
|
||||||
|
|
||||||
# Check to see that this really is a libtool 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=
|
pic_object=
|
||||||
non_pic_object=
|
non_pic_object=
|
||||||
|
|
||||||
@ -2760,7 +2782,7 @@ func_mode_link ()
|
|||||||
# A libtool-controlled object.
|
# A libtool-controlled object.
|
||||||
|
|
||||||
# Check to see that this really is a libtool 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=
|
pic_object=
|
||||||
non_pic_object=
|
non_pic_object=
|
||||||
|
|
||||||
@ -3098,8 +3120,7 @@ func_mode_link ()
|
|||||||
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
|
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
|
||||||
case " $predeps $postdeps " in
|
case " $predeps $postdeps " in
|
||||||
*" $deplib "*)
|
*" $deplib "*)
|
||||||
if (${SED} -e '2q' $lib |
|
if func_lalib_p "$lib"; then
|
||||||
$GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
|
|
||||||
library_names=
|
library_names=
|
||||||
old_library=
|
old_library=
|
||||||
case $lib in
|
case $lib in
|
||||||
@ -3268,10 +3289,8 @@ func_mode_link ()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check to see that this really is a libtool archive.
|
# 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 :
|
func_lalib_p "$lib" || \
|
||||||
else
|
|
||||||
func_fatal_error "\`$lib' is not a valid libtool archive"
|
func_fatal_error "\`$lib' is not a valid libtool archive"
|
||||||
fi
|
|
||||||
|
|
||||||
ladir=`$ECHO "X$lib" | $Xsed -e 's%/[[^/]]*$%%'`
|
ladir=`$ECHO "X$lib" | $Xsed -e 's%/[[^/]]*$%%'`
|
||||||
test "X$ladir" = "X$lib" && ladir="."
|
test "X$ladir" = "X$lib" && ladir="."
|
||||||
@ -6461,7 +6480,7 @@ func_mode_uninstall ()
|
|||||||
case $name in
|
case $name in
|
||||||
*.la)
|
*.la)
|
||||||
# Possibly a libtool archive, so verify it.
|
# 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
|
. $dir/$name
|
||||||
|
|
||||||
# Delete the libtool libraries and symlinks.
|
# Delete the libtool libraries and symlinks.
|
||||||
@ -6508,7 +6527,7 @@ func_mode_uninstall ()
|
|||||||
|
|
||||||
*.lo)
|
*.lo)
|
||||||
# Possibly a libtool object, so verify it.
|
# 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
|
# Read the .lo file
|
||||||
. $dir/$name
|
. $dir/$name
|
||||||
@ -6540,7 +6559,7 @@ func_mode_uninstall ()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Do a test to see if this is a libtool program.
|
# 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=
|
relink_command=
|
||||||
. $dir/$noexename
|
. $dir/$noexename
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user