summaryrefslogtreecommitdiff
path: root/depend.sh
blob: 7e43e2150bd043109f1a781a748fbaabaa7df8cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

DEP=$1
DIR=$2
CC=$3
shift 3

echo -n "$DEP $DIR/" > $DEP
if { !(eval $CC -MM $*) >> $DEP; }; then
    rm -f $DEP;
    exit 1;
fi

#sed -e 's@^\(.*\)\.o:@\1.d \1.o:@'