From 024c6e0e38a1f518d45e5d95d0d37098e7590c5f Mon Sep 17 00:00:00 2001 From: yar Date: Fri, 14 Oct 2005 23:30:17 +0000 Subject: Let modules use the kernel's opt_*.h files if built along with the kernel by wrapping all targets for fake opt_*.h files in .if defined(KERNBUILDDIR). Thus, such fake files won't be created at all if modules are built with the kernel. Some modules undergo cleanup like removing unused or unneeded options or .h files, without which they wouldn't build this way or the other. Reviewed by: ru Tested by: no binary changes in modules built alone Tested on: i386 sparc64 amd64 --- sys/modules/nfsclient/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/modules/nfsclient') diff --git a/sys/modules/nfsclient/Makefile b/sys/modules/nfsclient/Makefile index 1d7565e..7b4a29d 100644 --- a/sys/modules/nfsclient/Makefile +++ b/sys/modules/nfsclient/Makefile @@ -12,9 +12,6 @@ SRCS+= nfs4_dev.c nfs4_idmap.c nfs4_socket.c nfs4_subs.c \ nfs4_vfs_subs.c nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c SRCS+= opt_inet6.h -NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel -NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel - # USE THE RPCCLNT: CFLAGS+= -DRPCCLNT_DEBUG SRCS+= rpcclnt.c @@ -22,6 +19,10 @@ SRCS+= rpcclnt.c # USE THE NEW IDMAPPER CFLAGS+= -DUSE_NEW_IDMAPPER +.if !defined(KERNBUILDDIR) +NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel +NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel + .if ${NFS_INET} > 0 opt_inet.h: echo "#define INET 1" > ${.TARGET} @@ -31,6 +32,7 @@ opt_inet.h: opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif +.endif .include -- cgit v1.1