0107-inference.sh - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
0107-inference.sh (368B)
---
1 #!/bin/sh
2
3 trap 'rm -f $tmp1 $tmp2 f f.?' EXIT INT TERM QUIT HUP
4
5 tmp1=tmp1.$$
6 tmp2=tmp2.$$
7
8 cat >$tmp1 <<EOF
9 c99 -O -o f f.c
10 EOF
11
12 cat >f.c <<'EOF'
13 int
14 main(void)
15 {
16 return 0;
17 }
18 EOF
19
20 touch -d '1970-01-01 00:00:01' f.h
21 touch -d '1970-01-01 00:00:03' f
22 touch -d '1970-01-01 00:00:04' f.c
23
24 scc make -f- <<'EOF' > $tmp2 2>&1
25 f: f.h
26
27 f.h:
28 touch $@
29 EOF
30
31 diff $tmp1 $tmp2