summaryrefslogtreecommitdiff
path: root/libtoolize.in
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2003-10-14 21:45:03 +0000
committerGary V. Vaughan <gary@gnu.org>2003-10-14 21:45:03 +0000
commit73263db76bbe86d79ddd88d4cb617b689897d509 (patch)
treee190162e37d4b72c836f6aad2d9b8bc683a86c4c /libtoolize.in
parent884ec923bd501efc6c43e7cfb58b7c903f397123 (diff)
downloadlibtool-73263db76bbe86d79ddd88d4cb617b689897d509.tar.gz
Refactor all the test case common code into shell functions in
tests/defs, and move the various demo directories out of $top_srcdir, and into tests too. The refactoring showed up a number of inconsistencies and latent bugs, as well as fixing (I think!!) the long-standing annoyance with some of the tests giving spurious failures intermittently. While I was here, emacs kindly removed a lot of bogus whitespace and added copyright notices for us: * cdemo, demo, depdemo, f77demo, mdemo, mdemo2, pdemo, tagdemo: Moved from here... * tests/cdemo, tests/demo, tests/depdemo, tests/f77demo, tests/mdemo, tests/mdemo2, tests/pdemo, tests/tagdemo: ...to here. * tests/defs: Factor much common functionality from the test scripts into shell functions. Added a copyright notice. * tests/assign.test, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/link-2.test, tests/link.test, tests/mdemo-conf.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo-unst.test, tests/quote.test, tests/sh.test, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Refactored to use new functions in tests/defs. Added a copyright notice. * tests/hardcode.test, noinst-link.test, tests/relink.test, tests/relink.test, tests/mdryrun.test: Ditto. Moved from here... * tests/demo-hardcode.test, demo-noinst-link.test, tests/demo-relink.test, tests/depdemo-relink.test, tests/mdemo-dryrun.test: ...to here respectively. * Makefile.am: Added a copyright notice. * tests/sh.test: Check libtoolize.in for non-portabilities too. * libtoolize.in: Fix non-portabilities found by tests/sh.test.
Diffstat (limited to 'libtoolize.in')
-rw-r--r--libtoolize.in32
1 files changed, 16 insertions, 16 deletions
diff --git a/libtoolize.in b/libtoolize.in
index 4d6cccf6..182e3dec 100644
--- a/libtoolize.in
+++ b/libtoolize.in
@@ -143,7 +143,7 @@ func_fatal_help ()
}; d'
- while test $# -gt 0; do
+ while test "$#" -gt 0; do
case $1 in
--copy | -c) shift; link_opt=false ;;
@@ -201,7 +201,7 @@ func_mkdir_p ()
}
# func_copy srcfile destfile
-# If --copy was specified, or soft-linking SRCFILE to DESTFILE fails,
+# If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE fails,
# then try to copy SRCFILE to DESTFILE.
func_copy ()
{
@@ -227,8 +227,8 @@ func_copy ()
}
# func_copy_all_files srcdir destdir [glob_exclude]
-# For each file in SRCDIR, if --copy was specified, or soft-linking the
-# file to DESTDIR fails, then try to copy the file to DESTDIR. If
+# For each file in SRCDIR, if option `--copy' was specified, or soft-linking
+# the file to DESTDIR fails, then try to copy the file to DESTDIR. If
# GLOB_EXCLUDE is given, exclude any matching filenames from the copy.
func_copy_all_files ()
{
@@ -244,7 +244,7 @@ func_copy_all_files ()
fi
if test -f "$my_srcdir/$my_filename"; then
- $force_opt || if test -e "$my_destdir/$my_filename"; then
+ $force_opt || if test -f "$my_destdir/$my_filename"; then
$quiet_opt \
|| func_error "\`$my_destdir/$my_filename' exists: use \`--force' to overwrite"
continue
@@ -325,11 +325,11 @@ func_scan_files ()
# Try to discover auxdir the same way it is discovered by configure.
# Note that we default to the current directory.
for dir in . .. ../..; do
- if test -f $dir/install-sh; then
+ if test -f "$dir/install-sh"; then
auxdir=$dir
break
- elif test -f $dir/install.sh; then
- auxdir=$dir
+ elif test -f "$dir/install.sh"; then
+ auxdir="$dir"
break
fi
done
@@ -376,7 +376,7 @@ func_included_files ()
/^m4_include(\[.*\])$/ { s,^m4_include(\[\(.*\)\])$,\1,; p; };
d'
- test -f $my_searchfile && echo $my_searchfile
+ test -f "$my_searchfile" && echo "$my_searchfile"
# Only recurse when we don't care if all the variables we use get
# trashed, since they are in global scope.
@@ -428,18 +428,18 @@ func_serial_update ()
my_src_serial=`func_serial "$my_macro_regex" "$my_srcfile"`
my_dest_serial=`func_serial "$my_macro_regex" "$my_destfile"`
- test $my_src_serial = 0 && {
+ test "$my_src_serial" -eq 0 && {
func_error "warning: no serial number on \`$my_srcfile', not copying."
return
}
# Only perform the file update if the destination has an older serial.
- test $my_src_serial -gt $my_dest_serial || my_update_p=false
+ test "$my_src_serial" -gt "$my_dest_serial" || my_update_p=false
- test $my_src_serial -gt $my_dest_serial \
+ test "$my_src_serial" -gt "$my_dest_serial" \
&& func_verbose "\`$my_srcfile' is serial $my_srcserial, greater than $my_destserial in \`$my_destfile'"
- if test $my_src_serial -lt $my_dest_serial; then
+ if test "$my_src_serial" -lt "$my_dest_serial"; then
func_error "\`$my_srcfile' is serial $my_srcserial, less than $my_destserial in \`$my_destfile'"
$force_opt \
|| func_fatal_error "Use \`--force' to replace newer libtool files with this version."
@@ -458,7 +458,7 @@ func_serial_update ()
# it has `m4_include([DESTFILE])', so the copy effectively already
# updated `aclocal.m4'.
$use_aclocal || if test -f aclocal.m4; then
- test $my_src_serial -gt `func_serial "$my_macro_regex" aclocal.m4` \
+ test "$my_src_serial" -gt `func_serial "$my_macro_regex" aclocal.m4` \
&& func_echo "You should add the contents of \'$my_destfile' to \`aclocal.m4'."
fi
@@ -500,7 +500,7 @@ func_ltmain_update ()
# FIXME: check versions, and only downgrade with --force
cmp -s "$my_srcfile" "$my_destfile"
- if test $? != 0 || $force_opt; then
+ if test "$?" -ne 0 || $force_opt; then
func_copy "$my_srcfile" "$my_destfile"
else
$quiet_opt \
@@ -525,7 +525,7 @@ func_config_update ()
# FIXME: check versions, and only downgrade with --force
cmp -s "$my_srcfile" "$my_destfile"
- if test $? != 0 || $force_opt; then
+ if test "$?" -ne 0 || $force_opt; then
func_copy "$my_srcfile" "$my_destfile"
else
$quiet_opt \