Import some bmake glue for bind-4.9.4-p1.

This is based on Paul Vixie's makefiles, but some of it doesn't look much
like it now.
This commit is contained in:
Peter Wemm 1996-08-29 19:43:00 +00:00
parent ebcbc731ab
commit 8fedc449da
15 changed files with 328 additions and 0 deletions

8
usr.sbin/bind/Makefile Normal file
View File

@ -0,0 +1,8 @@
# $Id$
SUBDIR= named named-xfer \
ndc named.reload named.restart \
addr dig dnsquery host nslookup \
man
.include <bsd.subdir.mk>

View File

@ -0,0 +1,29 @@
# From: Id: Makefile.inc,v 8.4 1996/03/03 17:42:43 vixie Exp
# $Id$
.ifndef (Mk.Inc)
Mk.Inc?=defined
BIND_DIR= ${.CURDIR}/../../../contrib/bind
VER!= awk -F' *= *' '$$1 == "VER" { print $$2 ; exit }' \
${BIND_DIR}/Makefile
PIDDIR= /var/run
INDOT=
XFER_INDOT= ${INDOT}
PS= ps
DESTSBIN= /usr/sbin
DESTBIN= /usr/bin
DESTLIBEXEC= /usr/libexec
IOT= ABRT
CONFIG?= -DUSE_OPTIONS_H
INCLUDE?= -I. -I${BIND_DIR} -I${BIND_DIR}/include
CFLAGS+= ${INCLUDE} ${CONFIG}
BINGRP= bin
BINOWN= bin
.include "Makefile.maninc"
.endif

View File

@ -0,0 +1,56 @@
# From: Id: Makefile.maninc,v 8.1 1994/12/15 06:23:43 vixie Exp
# $Id$
# (the BIND kit's man page Makefile has gotten bad and crazy over the years.
# this file has to be included AFTER bsd.prog.mk (which includes bsd.man.mk))
CMD_EXT= 1
SYSCALL_EXT= 2
BSD_SYSCALL_EXT=2
LIB_C_EXT= 3
LIB_NETWORK_EXT=3
FORMAT_EXT= 5
DESC_EXT= 7
SYS_OPS_EXT= 8
EXT_SED_CMD = INDOT_U=`echo "${INDOT}"|tr "[a-z]" "[A-Z]"`; \
export INDOT_U; \
XFER_INDOT_U=`echo "${XFER_INDOT}"|tr "[a-z]" "[A-Z]"`; \
export XFER_INDOT_U; \
CMD_EXT_U=`echo "${CMD_EXT}"|tr "[a-z]" "[A-Z]"`; \
export CMD_EXT_U; \
SYS_OPS_EXT_U=`echo "${SYS_OPS_EXT}"|tr "[a-z]" "[A-Z]"`; \
export SYS_OPS_EXT_U; \
LIB_NETWORK_EXT_U=`echo "${LIB_NETWORK_EXT}"|tr "[a-z]" "[A-Z]"`; \
export LIB_NETWORK_EXT_U; \
FORMAT_EXT_U=`echo "${FORMAT_EXT}"|tr "[a-z]" "[A-Z]"`; \
export FORMAT_EXT_U; \
DESC_EXT_U=`echo "${DESC_EXT}"|tr "[a-z]" "[A-Z]"`; \
export DESC_EXT_U; \
SYSCALL_EXT_U=`echo "${SYSCALL_EXT}"|tr "[a-z]" "[A-Z]"`; \
export SYSCALL_EXT_U; \
BSD_SYSCALL_EXT_U=`echo "${BSD_SYSCALL_EXT}"|tr "[a-z]" "[A-Z]"`; \
export BSD_SYSCALL_EXT_U; \
LIB_C_EXT_U=`echo "${LIB_C_EXT}"|tr "[a-z]" "[A-Z]"`; \
export LIB_C_EXT_U; \
sed -e "s/@INDOT@/${INDOT}/g" \
-e "s/@INDOT_U@/$${INDOT_U}/g" \
-e "s/@XFER_INDOT@/${XFER_INDOT}/g" \
-e "s/@XFER_INDOT_U@/$${XFER_INDOT_U}/g" \
-e "s/@CMD_EXT@/${CMD_EXT}/g" \
-e "s/@CMD_EXT_U@/$${CMD_EXT_U}/g" \
-e "s/@LIB_NETWORK_EXT@/${LIB_NETWORK_EXT}/g" \
-e "s/@LIB_NETWORK_EXT_U@/$${LIB_NETWORK_EXT_U}/g" \
-e "s/@FORMAT_EXT@/${FORMAT_EXT}/g" \
-e "s/@FORMAT_EXT_U@/$${FORMAT_EXT_U}/g" \
-e "s/@DESC_EXT@/${DESC_EXT}/g" \
-e "s/@DESC_EXT_U@/$${DESC_EXT_U}/g" \
-e "s/@SYS_OPS_EXT@/${SYS_OPS_EXT}/g" \
-e "s/@SYS_OPS_EXT_U@/$${SYS_OPS_EXT_U}/g" \
-e "s/@SYSCALL_EXT@/${SYSCALL_EXT}/g" \
-e "s/@SYSCALL_EXT_U@/$${SYSCALL_EXT_U}/g" \
-e "s/@BSD_SYSCALL_EXT@/${BSD_SYSCALL_EXT}/g" \
-e "s/@BSD_SYSCALL_EXT_U@/$${BSD_SYSCALL_EXT_U}/g" \
-e "s/@LIB_C_EXT@/${LIB_C_EXT}/g" \
-e "s/@LIB_C_EXT_U@/$${LIB_C_EXT_U}/g"
MANFILTER= ${EXT_SED_CMD}

View File

@ -0,0 +1,13 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/tools
.PATH: ${BIND_DIR}/man
PROG= addr
NOMAN= naughty vixie! :-)
BINDIR= ${DESTBIN}
.include <bsd.prog.mk>

View File

@ -0,0 +1,14 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/tools \
${BIND_DIR}/tools/nslookup \
${BIND_DIR}/man
PROG= dig
SRCS= dig.c list.c subr.c debug.c send.c
BINDIR= ${DESTBIN}
.include <bsd.prog.mk>

View File

@ -0,0 +1,12 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/tools
.PATH: ${BIND_DIR}/man
PROG= dnsquery
BINDIR= ${DESTBIN}
.include <bsd.prog.mk>

View File

@ -0,0 +1,12 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/tools
.PATH: ${BIND_DIR}/man
PROG= host
BINDIR= ${DESTBIN}
.include <bsd.prog.mk>

View File

@ -0,0 +1,18 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/man
MAN3+= gethostbyname.3 getnetent.3 resolver.3
MLINKS+=gethostbyname.3 endhostent.3 gethostbyname.3 gethostbyaddr.3 \
gethostbyname.3 sethostent.3 gethostbyname.3 gethostent.3 \
gethostbyname.3 herror.3
MLINKS+=getnetent.3 endnetent.3 getnetent.3 getnetbyaddr.3 \
getnetent.3 getnetbyname.3 getnetent.3 setnetent.3
MLINKS+=resolver.3 dn_comp.3 resolver.3 dn_expand.3 resolver.3 res_init.3 \
resolver.3 res_mkquery.3 resolver.3 res_send.3 resolver.3 res_query.3 \
resolver.3 res_search.3
.include <bsd.prog.mk>

View File

@ -0,0 +1,21 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/named
.PATH: ${BIND_DIR}/man
PROG= named-xfer
SRCS= named-xfer.c db_glue.c storage.c dmalloc.c version.c
MAN8= named-xfer.8
BINDIR= ${DESTLIBEXEC}
CLEANFILES+= version.c
version.c: Version.c ${BIND_DIR}/Makefile
(u=$${USER-root} d=`pwd` h=`hostname` t=`date`; \
sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
< ${BIND_DIR}/named/Version.c > version.c)
.include <bsd.prog.mk>

View File

@ -0,0 +1,23 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/named
.PATH: ${BIND_DIR}/man
BINDIR= ${DESTSBIN}
MAN8= named.reload.8
CLEANFILES+= named.reload
all: named.reload
realinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} named.reload \
${DESTDIR}${BINDIR}
named.reload: named.reload.sh ${BIND_DIR}/Makefile
sed -e "s|%INDOT%|${INDOT}|" \
-e "s|%DESTSBIN%|${DESTSBIN}|" \
< ${BIND_DIR}/named/named.reload.sh > named.reload
.include <bsd.prog.mk>

View File

@ -0,0 +1,23 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/named
.PATH: ${BIND_DIR}/man
BINDIR= ${DESTSBIN}
MAN8= named.restart.8
CLEANFILES+= named.restart
all: named.restart
realinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} named.restart \
${DESTDIR}${BINDIR}
named.restart: named.restart.sh ${BIND_DIR}/Makefile
sed -e "s|%INDOT%|${INDOT}|" \
-e "s|%DESTSBIN%|${DESTSBIN}|" \
< ${BIND_DIR}/named/named.restart.sh > named.restart
.include <bsd.prog.mk>

View File

@ -0,0 +1,25 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/named
.PATH: ${BIND_DIR}/man
PROG= named
SRCS= version.c db_dump.c db_glue.c db_load.c db_lookup.c db_reload.c \
db_save.c db_secure.c db_update.c dmalloc.c ns_forw.c \
ns_init.c ns_main.c ns_maint.c ns_ncache.c ns_req.c ns_resp.c \
ns_sort.c ns_stats.c ns_validate.c storage.c tree.c
MAN8= named.8
BINDIR= ${DESTSBIN}
CLEANFILES+= version.c
version.c: Version.c ${BIND_DIR}/Makefile
(u=$${USER-root} d=`pwd` h=`hostname` t=`date`; \
sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
< ${BIND_DIR}/named/Version.c > version.c)
.include <bsd.prog.mk>

View File

@ -0,0 +1,26 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/named
.PATH: ${BIND_DIR}/man
BINDIR= ${DESTSBIN}
MAN8= ndc.8
CLEANFILES+= ndc
all: ndc
realinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ndc \
${DESTDIR}${BINDIR}
ndc: ndc.sh awkedit ${BIND_DIR}/Makefile
sed -e "s|%PIDDIR%|${PIDDIR}|" \
-e "s|%INDOT%|${INDOT}|" \
-e "s|%PS%|${PS}|" \
-e "s|%DESTSBIN%|${DESTSBIN}|" \
-e "s|%IOT%|${IOT}|" \
< ${BIND_DIR}/named/ndc.sh | awk -f ${.CURDIR}/awkedit > ndc
.include <bsd.prog.mk>

24
usr.sbin/bind/ndc/awkedit Normal file
View File

@ -0,0 +1,24 @@
# $Id$
NR == 3 {
print "# If there is a global system configuration file, suck it in."
print "if [ -f /etc/sysconfig ]; then"
print "\t. /etc/sysconfig"
print "fi\n"
}
{
if ($1 == "named") {
printf "\t\t# $namedflags is imported from /etc/sysconfig\n"
printf "\t\tif [ \"X${namedflags}\" != \"XNO\" ]; then\n"
printf "\t\t\tnamed ${namedflags} && {\n"
getline
printf "\t%s\n", $0
getline
printf "\t%s\n", $0
getline
printf "\t%s\n", $0
printf "\t\tfi\n"
} else {
gsub(":/usr/ucb:", ":", $0);
print;
}
}

View File

@ -0,0 +1,24 @@
# $Id$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${BIND_DIR}/tools/nslookup
.PATH: ${BIND_DIR}/man
PROG= nslookup
SRCS= main.c getinfo.c debug.c send.c skip.c list.c subr.c commands.c
MAN8= nslookup.8
LDADD= -ll
DPADD= ${LIBL}
BINDIR= ${DESTBIN}
CLEANFILES+= commands.c lex.yy.c lex.yy.o
beforeinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
${BIND_DIR}/tools/nslookup/nslookup.help \
${DESTDIR}/usr/share/misc/nslookup.help
.include <bsd.prog.mk>