diff --git a/usr.sbin/named/Makefile b/usr.sbin/named/Makefile index 4906e909b26f..b29158f03bb1 100644 --- a/usr.sbin/named/Makefile +++ b/usr.sbin/named/Makefile @@ -1,23 +1,25 @@ -# $Id$ +# $Id: Makefile,v 1.17 1997/02/22 16:07:57 peter Exp $ .include "${.CURDIR}/Makefile.inc" -.PATH: ${BIND_DIR}/named -.PATH: ${BIND_DIR}/man +.PATH: ${BIND_DIR}/bin/named +.PATH: ${BIND_DIR}/doc/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 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_udp.c ns_validate.c storage.c tree.c +SRCS= tmp_version.c pathnames.h ns_parser.h \ + db_dump.c db_load.c db_lookup.c db_save.c db_update.c \ + db_glue.c \ + ns_parser.c ns_lexer.c ns_parseutil.c \ + ns_forw.c ns_init.c ns_main.c ns_maint.c ns_req.c \ + ns_resp.c ns_stats.c ns_ncache.c ns_xfr.c ns_glue.c \ + ns_udp.c ns_config.c ns_update.c MAN8= named.8 -CLEANFILES+= version.c +CLEANFILES+= ns_parser.c ns_parser.h y.tab.c t.tab.h -version.c: Version.c ${BIND_DIR}/Makefile - (u=$${USER-root} d=`pwd` h=`hostname` t=`LC_TIME=C date`; \ - sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \ - -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ - < ${BIND_DIR}/named/Version.c > version.c) +afterinstall: + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${BIND_DIR}/bin/named/named-bootconf.pl \ + ${DESTDIR}${DESTETC}/named-bootconf.pl .include diff --git a/usr.sbin/named/Makefile.inc b/usr.sbin/named/Makefile.inc index 3b13a893429d..5389509d0415 100644 --- a/usr.sbin/named/Makefile.inc +++ b/usr.sbin/named/Makefile.inc @@ -1,24 +1,47 @@ # From: Id: Makefile.inc,v 8.4 1996/03/03 17:42:43 vixie Exp -# $Id: Makefile.inc,v 1.4 1997/02/22 16:07:58 peter Exp $ +# $Id: Makefile.inc,v 1.5 1997/05/17 11:53:03 peter Exp $ .ifndef (Mk.Inc) Mk.Inc?=defined BIND_DIR= ${.CURDIR}/../../contrib/bind -VER!= awk -F' *= *' '$$1 == "VER" { print $$2 ; exit }' \ - ${BIND_DIR}/Makefile +VER!= cat ${BIND_DIR}/Version -PIDDIR= /var/run -INDOT= -XFER_INDOT= ${INDOT} PS= ps +PIDDIR= /var/run +DESTETC= /etc/namedb +DESTEXEC= /usr/libexec +DESTRUN= /var/run DESTSBIN= /usr/sbin -IOT= ABRT +DESTHELP= /usr/share/misc -CONFIG?= -DUSE_OPTIONS_H -INCLUDE?= -I${BIND_DIR} -I${BIND_DIR}/include +INCLUDE= -I${BIND_DIR}/port/freebsd/include -I${BIND_DIR}/include -I. CFLAGS+= ${INCLUDE} ${CONFIG} +.if exists(${.OBJDIR}/../../lib/libbind) +LDADD+= -L${.OBJDIR}/../../lib/libbind -lbind +DPADD+= ${.OBJDIR}/../../lib/libbind/libbind.a +.else +LDADD+= -L${.CURDIR}/../../lib/libbind -lbind +DPADD+= ${.CURDIR}/../../lib/libbind/libbind.a +.endif + +CLEANFILES+= tmp_version.c pathnames.h + +tmp_version.c: version.c ${BIND_DIR}/Version + (u=$${USER-root} d=`pwd` h=`hostname` t=`LC_TIME=C date`; \ + sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \ + -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ + < ${BIND_DIR}/bin/named/version.c > tmp_version.c) + +pathnames.h: pathtemplate.h ${.CURDIR}/../../usr.sbin/named/Makefile.inc + rm -f pathnames.h + sed -e "s|%DESTSBIN%|${DESTSBIN}|" \ + -e "s|%DESTEXEC%|${DESTEXEC}|" \ + -e "s|%DESTETC%|${DESTETC}|" \ + -e "s|%DESTRUN%|${DESTRUN}|" \ + < ${BIND_DIR}/bin/named/pathtemplate.h > pathnames.h + .include "Makefile.maninc" .endif diff --git a/usr.sbin/named/Makefile.maninc b/usr.sbin/named/Makefile.maninc index 8551e63f099c..26ede9e675a7 100644 --- a/usr.sbin/named/Makefile.maninc +++ b/usr.sbin/named/Makefile.maninc @@ -1,5 +1,5 @@ # From: Id: Makefile.maninc,v 8.1 1994/12/15 06:23:43 vixie Exp -# $Id$ +# $Id: Makefile.maninc,v 1.3 1997/02/22 16:07:59 peter Exp $ # (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)) @@ -51,6 +51,7 @@ EXT_SED_CMD = INDOT_U=`echo "${INDOT}"|tr "[a-z]" "[A-Z]"`; \ -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" + -e "s/@LIB_C_EXT_U@/$${LIB_C_EXT_U}/g" \ + -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" MANFILTER= ${EXT_SED_CMD}