scc

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

0009-ignore.sh (336B)


      1 #!/bin/sh
      2 
      3 trap 'rm -f $tmp1 $tmp2' EXIT INT QUIT HUP TERM
      4 
      5 tmp1=tmp1.$$
      6 tmp2=tmp2.$$
      7 
      8 cat <<EOF > $tmp2
      9 no-valid-program
     10 sh: no-valid-program: not found
     11 make: error: don't know how to make hello
     12 EOF
     13 
     14 (scc-make -f - error hello 2>&1 |
     15 sed 's/sh:.*: *no-/sh: no-/' > $tmp1) <<EOF
     16 .IGNORE:
     17 
     18 error:
     19 	no-valid-program
     20 EOF
     21 
     22 diff $tmp1 $tmp2