freebsd-dev/contrib/bind/port/settings
Peter Wemm 4e0ffe0bae Import (trimmed) ISC bind-8.1.2-t3b. This will be updated to 8.1.2 on
final release.

Obtained from:  ftp.isc.org
1998-05-03 04:11:49 +00:00

36 lines
890 B
Bash
Executable File

#!/bin/sh
# this process is necessary because make(1) puts its command line into
# the environment, and when we exec a sub-make we need these command
# line settings (like CDEBUG=-g for example) to override what we get out
# of port/$systype/Makefile.set. therefore feed Makefile.set to this
# and it will merge things appropriately. a cache file is maintained
# to avoid calling this script way too often.
cachefile=${1-//}
if [ -f "$cachefile" ]; then
echo "Using $cachefile" >&2
exec cat $cachefile
fi
case $cachefile in
//) ;;
*) echo "Making $cachefile" >&2 ;;
esac
result=''
while read setting; do
var=`expr "$setting" : "'\([A-Z0-9_]*\)="`
val=`expr "$setting" : "'[A-Z0-9_]*=\([^']*\)'\$"`
eval "env=`echo \\${\$var-'$val'}`"
result="$result '$var=$env'"
done
case $cachefile in
//) echo $result ;;
*) echo $result > $cachefile
exec cat $cachefile ;;
esac
exit