Home
       0085-rule.sh - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       0085-rule.sh (308B)
       ---
            1 #!/bin/sh
            2 
            3 trap 'rm -f $tmp1 $tmp2 t1.c t?.o t2' EXIT INT TERM HUP QUIT
            4 
            5 tmp1=tmp1.$$
            6 tmp2=tmp2.$$
            7 
            8 cat > $tmp2 <<EOF
            9 t1
           10 t2
           11 t2
           12 EOF
           13 
           14 echo Hello > t1.c
           15 
           16 scc-make -f- <<'EOF' > $tmp1 2>&1
           17 .c.o:
           18         @echo $* > $@
           19 
           20 all: t1.o t2.o t2
           21         @cat t1.o t2.o t2
           22 
           23 t2.o:
           24         @echo $* > $@
           25 
           26 t2:
           27         @echo $* > $@
           28 EOF
           29 
           30 diff $tmp1 $tmp2