scc

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

mkconf (310B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 rm -f config.h
      6 trap "rm -f $$.h" 0 2 3
      7 
      8 PREFIX=${PREFIX-$HOME}
      9 
     10 echo $@ |
     11 (IFS='- 	' read arch abi sys format r
     12 echo \#define PREFIX \"$PREFIX\"
     13 echo \#define ARCH \"$arch\"
     14 echo \#define SYS  \"$sys\"
     15 echo \#define ABI  \"$abi\"
     16 echo \#define FORMAT \"$format\") > $$.h && mv $$.h config.h