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