summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2012-10-02 09:40:40 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-02 21:02:16 +0700
commitd43b40113ec1e8289e48d77f00e8947f2fd98fd4 (patch)
treef3e680c259b71726b2acc5beeed676903366cce7 /bootstrap
parent8fad6be03e8eca44e5e771cfbb907d3840a8e01e (diff)
downloadlibtool-d43b40113ec1e8289e48d77f00e8947f2fd98fd4.tar.gz
syntax-check: [REDO] fix violations and implement sc_prohibit_test_const_follows_var.
To safely use a non-literal fist argument to 'test', you must always prepend a literal non-'-' character, but often the second operand is a constant that doesn't begin with a '-' already, so always use 'test a = "$b"' instead of the noisy 'test "X$b" = Xa'. * cf.mk (sc_prohibit_test_const_follws_var): New syntax-check rule to ensure we don't reintroduce noisy test operands. bootstrap, build-aux/extract-trace, build-aux/general.m4sh, build-aux/ltmain.m4sh, configure.ac, doc/libtool.texi, libtoolize.m4sh, m4/argz.m4, m4/libtool.m4, m4/ltdl.m4, tests/bindir.at, tests/defs.m4sh, tests/demo-relink.test, tests/demo/configure.ac, tests/depdemo-relink.test, tests/destdir.at, tests/duplicate_conv.at, tests/fail.at, tests/getopt-m4sh.at, tests/help.at, tests/libtoolize.at, tests/link-2.test, tests/link-order2.at, tests/lt_dlopenext.at, tests/mdemo/configure.ac, tests/mdemo2/configure.ac, tests/need_lib_prefix.at, tests/nocase.at, tests/pdemo/configure.ac, tests/pic_flag.at, tests/search-path.at, tests/shlibpath.at, tests/static.at, tests/sysroot.at, tests/tagtrace.test, tests/testsuite.at, tests/with-pic.at: Swap operands to avoid useless noise. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap18
1 files changed, 9 insertions, 9 deletions
diff --git a/bootstrap b/bootstrap
index 14a3df39..26d073b8 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1023,7 +1023,7 @@ func_require_bootstrap_uptodate ()
$require_gnulib_path
- test x = x"$gnulib_path" \
+ test -z "$gnulib_path" \
|| func_cmp_s $progpath $gnulib_path/build-aux/bootstrap \
|| func_warning upgrade "\
\`$progpath' differs from \`./$gnulib_path/build-aux/bootstrap',
@@ -1624,7 +1624,7 @@ func_require_source_base ()
$require_gnulib_cache
- test -f "$gnulib_cache" && test x = "x$source_base" && {
+ test -f "$gnulib_cache" && test -z "$source_base" && {
$require_macro_dir
func_extract_trace "gl_SOURCE_BASE" "$gnulib_cache"
@@ -1649,7 +1649,7 @@ func_require_vc_ignore_files ()
test -n "$vc_ignore" || vc_ignore=auto
- if test auto = "$vc_ignore" && test x = x"$vc_ignore_files"; then
+ if test auto = "$vc_ignore" && test -z "$vc_ignore_files"; then
vc_ignore_files=
test -d .git && vc_ignore_files=.gitignore
test -d CVS && vc_ignore_files="$vc_ignore_files .cvsignore"
@@ -1760,7 +1760,7 @@ func_ifcontains ()
;;
esac
- test "$_G_status" -eq 0 || exit $_G_status
+ test 0 -eq "$_G_status" || exit $_G_status
}
@@ -1996,7 +1996,7 @@ func_show_eval ()
${opt_dry_run-'false'} || {
eval "$_G_cmd"
_G_status=$?
- test "$_G_status" -eq 0 || eval "(exit $_G_status); $_G_fail_exp"
+ test 0 -eq "$_G_status" || eval "(exit $_G_status); $_G_fail_exp"
}
}
@@ -2142,7 +2142,7 @@ func_get_version ()
func_tool_version_output $_G_app >/dev/null
_G_status=$?
- test "$_G_status" -ne 0 \
+ test 0 -ne "$_G_status" \
|| $_G_app --version 2>&1 |$SED -n "$sed_get_version"
(exit $_G_status)
@@ -2164,7 +2164,7 @@ func_check_versions ()
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
_G_appvar=`echo $_G_app |tr '[a-z]' '[A-Z]'`
- test "$_G_appvar" = TAR && _G_appvar=AMTAR
+ test TAR = "$_G_appvar" && _G_appvar=AMTAR
eval "_G_app=\${$_G_appvar-$_G_app}"
_G_instver=`func_get_version $_G_app`
@@ -2177,7 +2177,7 @@ func_check_versions ()
func_check_versions_result=false
# Fail if a new version than what we have is required.
- elif test "$_G_reqver" != "-"; then
+ elif test x- != "x$_G_reqver"; then
_G_newer=`func_sort_ver $_G_reqver $_G_instver |cut -d' ' -f2`
test "$_G_newer" != "$_G_instver" && {
func_error "\
@@ -2244,7 +2244,7 @@ func_update_po_files ()
func_find_tool SHA1SUM sha1sum gsha1sum shasum
_G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'`
- test "$_G_langs" = '*' && _G_langs=x
+ test '*' = "$_G_langs" && _G_langs=x
for _G_po in $_G_langs; do
case $_G_po in x) continue;; esac
_G_new_po=$_G_ref_po_dir/$_G_po.po