scc

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

0091-expansion.sh (280B)


      1 #!/bin/sh
      2 
      3 trap 'rm -f $tmp1 $tmp2' EXIT INT TERM QUIT HUP
      4 
      5 tmp1=tmp1.$$
      6 tmp2=tmp2.$$
      7 
      8 cat >$tmp2 <<EOF
      9 But before!
     10 Hello World!
     11 EOF
     12 
     13 scc make -f- <<'EOF' > $tmp1 2>&1
     14 STARGET = all
     15 
     16 b.$(STARGET): b$(STARGET)
     17 	@echo Hello World!
     18 
     19 ball:
     20 	@echo But before!
     21 EOF
     22 
     23 diff -u $tmp1 $tmp2