0108-lastopt.sh - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
       0108-lastopt.sh (386B)
       ---
            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 > $tmp1 <<EOF
            9 hyphen-target
           10 MYVAR is -42
           11 MYVAR is myval
           12 EOF
           13 
           14 (scc make -f- -- -42 <<'EOF'
           15 -42:
           16         @echo 'hyphen-target'
           17 EOF
           18 
           19 scc make -f- -- MYVAR=-42 <<'EOF'
           20 all:
           21         @@echo MYVAR is $(MYVAR)
           22 EOF
           23 
           24 scc make -f- -- MYVAR=myval -42 <<'EOF'
           25 -42:
           26         @echo MYVAR is $(MYVAR)
           27 EOF
           28 ) > $tmp2
           29 
           30 diff $tmp1 $tmp2