summaryrefslogtreecommitdiff
path: root/depend.sh
diff options
context:
space:
mode:
Diffstat (limited to 'depend.sh')
-rwxr-xr-xdepend.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/depend.sh b/depend.sh
index e640888..f1da434 100755
--- a/depend.sh
+++ b/depend.sh
@@ -1,12 +1,11 @@
#!/bin/sh
-# $Id$
-CC=$1
-shift
+DEP=$1
+CC=$2
+shift 2
-# $CC -M -MG $* | \
+echo -n "$DEP" | awk '{ ORS = ""; print $1 " "; sub (".d", ".o"); print $1 " "; }' > $DEP
+( $CC -MM $* || exit 1 ) >> $DEP
-( $CC -MM $* || exit 1 ) | \
-sed \
- -e 's@^\(.*\)\.o:@\1.d \1.o:@'
+#sed -e 's@^\(.*\)\.o:@\1.d \1.o:@'