From owner-freebsd-current Sun Jun 25 0:38:45 2000 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 97E1337B5DC; Sun, 25 Jun 2000 00:38:39 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id BAA62954; Sun, 25 Jun 2000 01:38:38 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id BAA09723; Sun, 25 Jun 2000 01:36:53 -0600 (MDT) Message-Id: <200006250736.BAA09723@harmony.village.org> To: Assar Westerlund Subject: Re: vnode_if.h: how should it be done ? Cc: current@FreeBSD.ORG, kris@FreeBSD.ORG In-reply-to: Your message of "25 Jun 2000 01:57:20 +0200." <5lwvjetyxr.fsf@assaris.sics.se> References: <5lwvjetyxr.fsf@assaris.sics.se> <5llmzyqsfm.fsf@assaris.sics.se> <5ln1kesdkq.fsf@assaris.sics.se> <200006220345.XAA42447@khavrinen.lcs.mit.edu> <200006240610.AAA01831@harmony.village.org> Date: Sun, 25 Jun 2000 01:36:53 -0600 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <5lwvjetyxr.fsf@assaris.sics.se> Assar Westerlund writes: : Warner Losh writes: : > In message <5llmzyqsfm.fsf@assaris.sics.se> Assar Westerlund writes: : > : The problem is that the source files are hidden in the kernel source : > : directory and not installed. Where should vnode_if.{src,pl} get : > : installed? It seems much simpler just to install vnode_if.h in : > : /usr/include/sys. Patch appended. : > : > No. : : > We don't install kenrel internal files. : : But it's not kernel internal. It's used by modules/KLDs ? Where : should these expect to find it? '.' : > Use SYSDIR instead. : : I'm not sure what you mean by this? Should vnode_if.h just reside in : /sys/sys and be used from there or what? No. I mean that you need to have a kernel in $SYSDIR (or in /sys or /usr/src) and that vnode_if.h will get built in '.'. : > : + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ : > : + ${.OBJDIR}/vnode_if.h \ : > : + ${DESTDIR}/usr/include/sys : > : > I object to this part of the patch. We shouldn't install this file. : > It isn't needed by anything outside of the kernel/drivers. : : Well, depends on your point of view if that's outside kernel/drivers, : but it's sure used by modules/KLDs. No. That's part of the kernel, for the purposes of this discussion. It isn't used by userland at all. It should be build by the kld system, and if it isn't, then it is a bug. Go look at sys/modules/msdos/Makefile for an example of how it is supposed to work. : > For drivers, it should be built automatically as part of the modules : > build system ala the *_if.m stuff. : : Where are these files installed so that they can be used by : third-party KLDs? They aren't installed. You must have a kernel tree to build the kld. Just add vnode_if.h to your SRCS and the rest happens automatically via bsd.kmod.mk. It works great. I do it all the time. In fact, I added SYSDIR support to bsd.kmod.mk at Timing Solutions so that we could compile our drivers outside of the tree. There are lots of generated files like this that aren't installed, nor should they be. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message