Home | History | Annotate | Line # | Download | only in bind
binclude4netbsd revision 1.1
      1  1.1  christos #!/bin/sh
      2  1.1  christos #
      3  1.1  christos # Use this script to update the bind include files used in the nameserver,
      4  1.1  christos # after you've imported and built the latest bind code. After you run this,
      5  1.1  christos # cvs import the resulting directory
      6  1.1  christos #
      7  1.1  christos # $ cd bind-X.Y.Z
      8  1.1  christos # $ configure
      9  1.1  christos # $ make
     10  1.1  christos # $ ./binclude4netbsd . /tmp/include
     11  1.1  christos # Fix manually the config.h file to disable things controlled by the Makefiles
     12  1.1  christos # $ cd /tmp/include
     13  1.1  christos # $ 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
     14  1.1  christos #
     15  1.1  christos 
     16  1.1  christos PROG=$(basename $0)
     17  1.1  christos if [ \( -z "$1" \) -o \( -z "$2" \) ]
     18  1.1  christos then
     19  1.1  christos 	echo "Usage: $PROG <bind-src> <include-dest>" 1>&2
     20  1.1  christos 	exit 1
     21  1.1  christos fi
     22  1.1  christos 
     23  1.1  christos BIND=$1
     24  1.1  christos INCLUDE=$2
     25  1.1  christos 
     26  1.1  christos mkdir -p $INCLUDE
     27  1.1  christos cp $BIND/config.h $INCLUDE
     28  1.1  christos 
     29  1.1  christos mkdir -p $INCLUDE/dns
     30  1.1  christos 
     31  1.1  christos cp $BIND/lib/dns/code.h $INCLUDE/dns
     32  1.1  christos 
     33  1.1  christos for i in enumclass.h enumtype.h rdatastruct.h
     34  1.1  christos do
     35  1.1  christos 	cp $BIND/lib/dns/include/dns/$i $INCLUDE/dns
     36  1.1  christos done
     37  1.1  christos 
     38  1.1  christos mkdir -p $INCLUDE/isc
     39  1.1  christos 
     40  1.1  christos cp $BIND/lib/isc/include/isc/platform.h $INCLUDE/isc
     41  1.1  christos 
     42  1.1  christos for d in irs
     43  1.1  christos do
     44  1.1  christos 	mkdir -p $INCLUDE/$d
     45  1.1  christos 
     46  1.1  christos 	for i in netdb.h platform.h
     47  1.1  christos 	do
     48  1.1  christos 		cp $BIND/lib/$d/include/$d/$i $INCLUDE/$d
     49  1.1  christos 	done
     50  1.1  christos done
     51  1.1  christos 
     52  1.1  christos cleantags $INCLUDE
     53