scc

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

0082-rule.sh (254B)


      1 #!/bin/sh
      2 
      3 trap 'rm -f $tmp1 f.c f.o f' EXIT
      4 trap 'exit 1' HUP INT TERM
      5 
      6 tmp1=tmp1.$$
      7 
      8 echo hello > f.c
      9 
     10 $EXEC scc make -sf- <<'EOF' > $tmp1 2>&1
     11 
     12 .SUFFIXES:
     13 
     14 .c:
     15 	echo hello > $@
     16 
     17 all: f
     18 EOF
     19 
     20 diff $tmp1 - <<EOF
     21 make: error: don't know how to make f
     22 EOF