scc

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

0083-rule.sh (219B)


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