scc

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

0104-env.sh (230B)


      1 #!/bin/sh
      2 
      3 export CFLAGS=World
      4 
      5 trap 'rm -f $tmp1' EXIT
      6 trap 'exit $?' HUP INT TERM
      7 
      8 tmp1=tmp1.$$
      9 
     10 $EXEC scc make -f - <<'EOF' > $tmp1 2>&1
     11 FLAGS=Hello $(CFLAGS)
     12 all:
     13 	@echo Hello $(CFLAGS)
     14 EOF
     15 
     16 diff $tmp1 - <<EOF
     17 Hello World
     18 EOF