scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

gendep.sh (359B)


      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 USEQBE=${USEQBE:-1}
     10 
     11 echo $@ |
     12 (IFS='- 	' read arch abi sys format r
     13 echo \#define PREFIX \"$PREFIX\"
     14 echo \#define USEQBE $USEQBE
     15 echo \#define ARCH \"$arch\"
     16 echo \#define SYS  \"$sys\"
     17 echo \#define ABI  \"$abi\"
     18 echo \#define FORMAT \"$format\") > $$.h && mv $$.h config.h