Skip site navigation (1)Skip section navigation (2)
Date:      08 Jun 2001 14:11:17 +0200
From:      assar@stacken.kth.se
To:        freebsd-arch@FreeBSD.org
Subject:   Re: kern/17613: impossible to build FS KLD without kernel source
Message-ID:  <5l3d9buq6y.fsf@assaris.sics.se>
In-Reply-To: Poul-Henning Kamp's message of "Fri, 08 Jun 2001 12:03:29 %2B0200"
References:  <5512.991994609@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
[ Poul-Henning said I should bring this to arch ]

This is a continuation of my PR kern/17613 where I noted that it's not
possible to build a FS KLD with having kernel source (needed to
generate vnode_if.h).

My proposed way of solving this is by having include/Makefile generate
this file so that it can be installed, along the lines of the patch
below.  Comments?

/assar

Index: Makefile
===================================================================
RCS file: /home/ncvs/src/include/Makefile,v
retrieving revision 1.125
diff -u -w -u -w -r1.125 Makefile
--- Makefile	2000/10/16 07:00:18	1.125
+++ Makefile	2001/06/08 09:23:40
@@ -6,7 +6,7 @@
 # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
 # links.
 
-CLEANFILES= osreldate.h version vers.c
+CLEANFILES= osreldate.h version vers.c vnode_if.h
 SUBDIR= rpcsvc
 FILES=	a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
 	dlfcn.h elf.h err.h fnmatch.h fstab.h \
@@ -59,7 +59,7 @@
 #SHARED=	symlinks
 SHARED?=	copies
 
-all:	osreldate.h
+all:	osreldate.h vnode_if.h
 
 osreldate.h:	${.CURDIR}/../sys/conf/newvers.sh \
 		${.CURDIR}/../sys/sys/param.h
@@ -70,6 +70,11 @@
 	echo \#'undef __FreeBSD_version' >> osreldate.h;	\
 	echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h
 
+vnode_if.h:	${.CURDIR}/../sys/kern/vnode_if.pl \
+		${.CURDIR}/../sys/kern/vnode_if.src
+	@${ECHO} creating vnode_if.h
+	perl ${.CURDIR}/../sys/kern/vnode_if.pl -h ${.CURDIR}/../sys/kern/vnode_if.src
+
 beforeinstall: ${SHARED}
 	@rm -f ${DESTDIR}/usr/include/timepps.h
 	cd ${.CURDIR}; \
@@ -87,6 +92,9 @@
 	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.OBJDIR}/osreldate.h \
 		${DESTDIR}/usr/include
+	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+		${.OBJDIR}/vnode_if.h \
+		${DESTDIR}/usr/include/sys
 .for i in ${LFILES}
 	ln -sf sys/$i ${DESTDIR}/usr/include/$i
 .endfor

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5l3d9buq6y.fsf>