aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/amd
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2004-11-28 14:10:20 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2004-11-28 14:10:20 +0000
commite1a7ca9f96ab1822dd481b8f243109a9ba4e7b6b (patch)
tree038f934ba8e0095f07240bc89874b9ceab9e2e7d /usr.sbin/amd
parentc27c338349d16627e73c730fe953563e8ae229c1 (diff)
Notes
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r--usr.sbin/amd/Makefile.inc3
-rw-r--r--usr.sbin/amd/amd/Makefile6
-rw-r--r--usr.sbin/amd/include/Makefile8
3 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc
index dd65ed3a8029f..612f9f7aa2d01 100644
--- a/usr.sbin/amd/Makefile.inc
+++ b/usr.sbin/amd/Makefile.inc
@@ -17,6 +17,9 @@ CFLAGS+= -I${.OBJDIR}/../include
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/include
CFLAGS+= -I${.CURDIR}/../../../contrib/amd
CFLAGS+= -DHAVE_CONFIG_H
+.if defined(NO_NIS)
+CFLAGS+= -DHAVE_LOCALCONFIG_H
+.endif
CFLAGS+= -DHOST_CPU=\"${MACHINE_ARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\"
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile
index eb30395a46d2d..592268801eb6b 100644
--- a/usr.sbin/amd/amd/Makefile
+++ b/usr.sbin/amd/amd/Makefile
@@ -15,7 +15,7 @@ SRCS+= am_ops.c amd.c amfs_auto.c amfs_direct.c amfs_error.c
SRCS+= amfs_host.c amfs_inherit.c amfs_link.c amfs_linkx.c amfs_nfsl.c
SRCS+= amfs_nfsx.c amfs_program.c amfs_root.c amfs_toplvl.c
SRCS+= amfs_union.c amq_subr.c amq_svc.c autil.c clock.c conf.c
-SRCS+= get_args.c info_file.c info_hesiod.c info_ndbm.c info_nis.c info_passwd.c
+SRCS+= get_args.c info_file.c info_hesiod.c info_ndbm.c info_passwd.c
SRCS+= info_union.c map.c mapc.c mntfs.c nfs_prot_svc.c nfs_start.c
SRCS+= nfs_subr.c ops_cdfs.c ops_mfs.c ops_nfs.c ops_nfs3.c
SRCS+= ops_nullfs.c ops_pcfs.c ops_tfs.c ops_ufs.c ops_umapfs.c
@@ -39,4 +39,8 @@ CLEANFILES+= mount_xdr.c
mount_xdr.c: ${MOUNT_X}
${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET}
+.if !defined(NO_NIS)
+SRCS+= info_nis.c
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/include/Makefile b/usr.sbin/amd/include/Makefile
index d3cf00021203f..7fa54aefe69af 100644
--- a/usr.sbin/amd/include/Makefile
+++ b/usr.sbin/amd/include/Makefile
@@ -8,6 +8,9 @@
# $NetBSD: Makefile,v 1.8 1998/08/08 22:33:37 christos Exp $
SRCS= config_local.h
+.if defined(NO_NIS)
+SRCS+= localconfig.h
+.endif
CLEANFILES= ${SRCS}
all depend: ${SRCS}
@@ -16,4 +19,9 @@ config_local.h: newvers.sh
@rm -f ${.TARGET}
sh ${.ALLSRC} ${.CURDIR}/../../../sys/conf/newvers.sh > ${.TARGET}
+localconfig.h:
+ @rm -f ${.TARGET}
+ @echo "/* NIS disabled by NO_NIS make.conf option */" >> ${.TARGET}
+ @echo "#undef HAVE_MAP_NIS" >> ${.TARGET}
+
.include <bsd.prog.mk>