summaryrefslogtreecommitdiff
path: root/lib/depcomp
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-10-18 12:47:17 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-11-24 15:52:40 +0100
commit883723873c94bdd3a9a3c9a376e3b2b266db5ca3 (patch)
tree1fcaa3a768656dc6f2cd508bb6d556629e3bffc2 /lib/depcomp
parentfe1625a4b00b402d6333be0d7999a41ed4983204 (diff)
downloadautomake-883723873c94bdd3a9a3c9a376e3b2b266db5ca3.tar.gz
depcomp: be more idiomatic in checking for zero exit statuses
* lib/depcomp: Prefer "if test $stat -ne 0; then ..." over the longer "if test $stat -eq 0; then :; else ...". Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/depcomp')
-rwxr-xr-xlib/depcomp26
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/depcomp b/lib/depcomp
index e1f51f482..dfc97debb 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,7 +1,7 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2012-07-12.20; # UTC
+scriptversion=2012-10-18.11; # UTC
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
@@ -136,8 +136,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -163,8 +162,7 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -206,8 +204,7 @@ sgi)
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -269,8 +266,7 @@ aix)
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@@ -317,8 +313,7 @@ icc)
# with horizontal tabulation characters.
"$@" -MD -MF "$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -434,8 +429,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -497,8 +491,7 @@ tru64)
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
@@ -525,8 +518,7 @@ msvc7)
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
- if test "$stat" = 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi