1# 2# gendef filename var=val var=val ... 3# 4# This script is used to generate src/include/defs.h 5# 6 7file=$1 8shift 9 10defs="#define $1" 11shift 12for def 13do 14 defs="$defs 15#define $def" 16done 17 18# Use $TMPDIR if defined. Default to cwd, for non-Unix systems 19# which don't have /tmp on each drive (we are going to remove 20# the file before we exit anyway). Put the PID in the basename, 21# since the extension can only hold 3 characters on MS-DOS. 22t=${TMPDIR-.}/gro$$.tmp 23 24sed -e 's/=/ /' >$t <<EOF 25$defs 26EOF 27 28test -r $file && cmp -s $t $file || cp $t $file 29 30rm -f $t 31 32exit 0 33 34# eof 35