#!/bin/sh # # Use this script to update the bind include files used in the nameserver, # after you've imported and built the latest bind code. After you run this, # cvs import the resulting directory # # $ cd bind-X.Y.Z # $ configure # $ make # $ ./binclude4netbsd . /tmp/include # Fix manually the config.h file to disable things controlled by the Makefiles # $ cd /tmp/include # $ cvs -d cvs.netbsd.org:/cvsroot import src/external/bsd/bind/include -m "Include files for bind-X-Y-Z" ISC bind-X-Y-Z # PROG=$(basename $0) if [ \( -z "$1" \) -o \( -z "$2" \) ] then echo "Usage: $PROG " 1>&2 exit 1 fi BIND=$1 INCLUDE=$2 copy() { f="$(basename "$1")" sed -e 's/\$\(Id.*\) \$/\1/' \ -e 's/\$\(Created.*\) \$/\1/' \ -e 's/\$\(Header.*\) \$/\1/' \ -e 's/\$\(Revision.*\) \$/\1/' \ < "$1" > "$2/$f" } mkdir -p $INCLUDE copy $BIND/config.h $INCLUDE mkdir -p $INCLUDE/dns copy $BIND/lib/dns/code.h $INCLUDE/dns for i in enumclass.h enumtype.h rdatastruct.h do copy $BIND/lib/dns/include/dns/$i $INCLUDE/dns done mkdir -p $INCLUDE/isc copy $BIND/lib/isc/include/isc/platform.h $INCLUDE/isc mkdir -p $INCLUDE/lwres for i in netdb.h platform.h do copy $BIND/lib/lwres/include/lwres/$i $INCLUDE/lwres done