scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0093-inference.sh (261B)


      1 #!/bin/sh
      2 
      3 trap 'rm -f f.? $tmp1 $tmp2 f.?' EXIT
      4 trap 'exit 1' HUP INT TERM
      5 
      6 tmp1=tmp1.$$
      7 tmp2=tmp2.$$
      8 
      9 cat >$tmp1 <<'EOF'
     10 f.o: f.h
     11 
     12 all: f.o
     13 EOF
     14 
     15 (touch f.c f.h
     16 $EXEC scc make -f $tmp1
     17 touch f.c
     18 scc make -f $tmp1) > $tmp2
     19 
     20 diff $tmp2 - <<EOF
     21 c99 -O -c f.c
     22 EOF