[PATCH] [SUMMARY] (Re: Build under FreeBSD-STABLE broken?)

qhwt at myrealbox.com qhwt at myrealbox.com
Tue Aug 19 08:40:27 PDT 2003


On Sun, Aug 17, 2003 at 07:26:15PM +0900, qhwt at xxxxxxxxxxxxx wrote:
> Is building DragonflyBSD under FreeBSD-STABLE broken?
> I just updated the source tree(Aug. 16 22:00 UTC),
> and tried to do the following:
> 
> $ cd ~source/dragonfly/src	# where I keep the source tree
> $ whoami			# build as user dragonfly, who can't
> dragonfly			# touch any part of the source tree
> $ rm -rf /usr/obj/*
> $ NOCLEAN=yes; KERNCONFDIR=~dragonfly/confs; KERNCONF=MYKERNEL
> $ export NOCLEAN KERNCONFDIR KERNCONF
> $ make buildworld		# this succeeded
> $ make buildkernel

My previous messages were a bit messy, so here's a summary.

The first patch(bsd.kmod.mk.diff) modifies bsd.kmod.mk so that it can
set SYSDIR properly when .CURDIR is one- or five-level deeper than
the top of sys directory, which include:
  sys/crypto
  sys/dev/disk/aic7xxx/ahc/ahc_eisa
You don't need this one if you keep your DragonflyBSD tree under
the standard /usr/src, and that is why David didn't see the
'No such file or directory' message. I'm still not sure about the
order or how this change breaks other places, but I'll let the list
know if anything strange happens on my test box.

The second patch(svr4-Makefile.diff) fixes sys/emulation/svr4/Makefile
by replacing .CURDIR with .OBJDIR, so that it looks at the files under
/usr/obj rather than in the source tree. You never notice if you have
write access to the source tree.

Regards.
Index: share/mk/bsd.kmod.mk
===================================================================
RCS file: /home/source/dragonfly/cvs/src/share/mk/bsd.kmod.mk,v
retrieving revision 1.2
diff -u -u -r1.2 bsd.kmod.mk
--- share/mk/bsd.kmod.mk	17 Jun 2003 04:37:02 -0000	1.2
+++ share/mk/bsd.kmod.mk	19 Aug 2003 06:27:36 -0000
@@ -2,7 +2,7 @@
 # $DragonFly: src/share/mk/bsd.kmod.mk,v 1.2 2003/06/17 04:37:02 dillon Exp $
 
 # Search for kernel source tree in standard places.
-.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys
+.for _dir in ${.CURDIR}/.. ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. ${.CURDIR}/../../../../.. /sys /usr/src/sys
 .if !defined(SYSDIR) && exists(${_dir}/conf/kmod.mk)
 SYSDIR=	${_dir}
 .endif
Index: sys/emulation/svr4/Makefile
===================================================================
RCS file: /home/source/dragonfly/cvs/src/sys/emulation/svr4/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- sys/emulation/svr4/Makefile	15 Aug 2003 06:32:56 -0000	1.5
+++ sys/emulation/svr4/Makefile	19 Aug 2003 07:10:52 -0000
@@ -9,13 +9,13 @@
 #
 sysent:	${.CURDIR}/svr4_sysent.c
 
-${.CURDIR}/svr4_sysent.c ${.CURDIR}/svr4_syscall.h ${.CURDIR}/svr4_proto.h ${.CURDIR}/svr4_union.h: ${.CURDIR}/../../kern/makesyscalls.sh \
-		${.CURDIR}/syscalls.master ${.CURDIR}/syscalls.conf
-	-mv -f ${.CURDIR}/svr4_sysent.c ${.CURDIR}/svr4_sysent.c.bak
-	-mv -f ${.CURDIR}/svr4_syscall.h ${.CURDIR}/svr4_syscall.h.bak
-	-mv -f ${.CURDIR}/svr4_proto.h ${.CURDIR}/svr4_proto.h.bak
-	-mv -f ${.CURDIR}/svr4_union.h ${.CURDIR}/svr4_union.h.bak
-	cd ${.CURDIR} && sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
+${.OBJDIR}/svr4_sysent.c ${.OBJDIR}/svr4_syscall.h ${.OBJDIR}/svr4_proto.h ${.OBJDIR}/svr4_union.h: ${.OBJDIR}/../../kern/makesyscalls.sh \
+		${.OBJDIR}/syscalls.master ${.OBJDIR}/syscalls.conf
+	-mv -f ${.OBJDIR}/svr4_sysent.c ${.OBJDIR}/svr4_sysent.c.bak
+	-mv -f ${.OBJDIR}/svr4_syscall.h ${.OBJDIR}/svr4_syscall.h.bak
+	-mv -f ${.OBJDIR}/svr4_proto.h ${.OBJDIR}/svr4_proto.h.bak
+	-mv -f ${.OBJDIR}/svr4_union.h ${.OBJDIR}/svr4_union.h.bak
+	cd ${.OBJDIR} && sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
 
 # This builds the module
 #




More information about the Bugs mailing list