blob: fc1466578bbad3ba4b4ab5860d443c696abf614a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/rc
x=/tmp/mk$pid
fn sigexit { rm -f $x }
fn sigint { rm -f $x }
tee $x < $1 | sed -e 's/\$\(([^)]*)\)([ :\/])/$\1\2/g
s/\$\(([^)]*)\)$/$\1/g
s/\$\(([^)]*)\)/${\1}/g
s/^ @/ /
/^ -/,/[^\\]$/{
/[^\\]\$/s/$/; set -e/
}
/^ -/s/ -/ set +e; /
s/:\&/:/
s/\$% /$stem /g
s/\$%\./$stem\./g
s/\$%/${stem}/g
s/\$@([ ]|$)/$target\1/g
s/\$@/${target}/g
s/\$\^/${prereq}/g
s/\$\?/$newprereq/g'
if(grep -s 'cd[ ]|make' < $x){
{
echo 'Warning: recipes containing cd or make need attention.'
grep 'cd[ ]|make' < $x
} >[1=2]
}
|