scc

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

0055-rule.sh (272B)


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