scc

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

0051-rule.sh (253B)


      1 #!/bin/sh
      2 
      3 trap 'rm -f $tmp1 $tmp2' EXIT INT QUIT TERM HUP
      4 
      5 tmp1=tmp1.$$
      6 tmp2=tmp2.$$
      7 
      8 echo Hello World! > $tmp2
      9 
     10 (set -e
     11  scc make -f- <<'EOF'
     12 .POSIX:
     13 
     14 all:
     15 	@echo Hello World!;\
     16 	false;\
     17 	echo bye
     18 EOF
     19 echo fail) > $tmp1 2> /dev/null
     20 
     21 diff $tmp1 $tmp2