summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo2000-09-16 14:13:22 +0000
committerleo2000-09-16 14:13:22 +0000
commite67c8b2a40808e972a3185696236a0d50f53008b (patch)
tree7654e85e1191f81e0d2163a5cc7665b4e8ee5b07
parentbd8a0d819afd7075f30c9051650dff31e55cef7e (diff)
Delete .d file if gcc could not create it correctly
git-svn-id: http://svn.leocad.org/trunk@117 c7d43263-9d01-0410-8a33-9dba5d9f93d6
-rwxr-xr-xdepend.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/depend.sh b/depend.sh
index bfc887c..7e43e21 100755
--- a/depend.sh
+++ b/depend.sh
@@ -6,7 +6,10 @@ CC=$3
shift 3
echo -n "$DEP $DIR/" > $DEP
-( $CC -MM $* || exit 1 ) >> $DEP
+if { !(eval $CC -MM $*) >> $DEP; }; then
+ rm -f $DEP;
+ exit 1;
+fi
#sed -e 's@^\(.*\)\.o:@\1.d \1.o:@'