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

next in thread | previous in thread | raw e-mail | index | archive | help

I'm really not our makefile wizard, I think you should ask on
arch@

In message <5l3d9b7252.fsf@assaris.sics.se>, assar@stacken.kth.se writes:
>Poul-Henning Kamp <phk@critter.freebsd.dk> writes:
>> >> >> It is belived that this is not the direction we want to take.
>> >> >
>> >> >Which is then the direction that we want to take?
>> >> 
>> >> We don't want to check in generated files.  We have more than enough
>> >> trouble with that as it is with the syscalls.master derived stuff.
>> >
>> >I guess I really wanted to ask if being able to build KLDs without
>> >kernel source is something we should be aiming for, and if so, what
>> >direction to take for doing that.
>> 
>> To my knowledge that is not a goal.
>
>I think it should be a goal.  Is it ok if this is done without more
>generated files in CVS?  For example, by having include/Makefile
>generate and install it?  See the patch below for illustration.
>
>/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
>

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

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




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