Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2003 17:41:04 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        Jake Burkholder <jake@FreeBSD.org>, <src-committers@FreeBSD.org>, <cvs-src@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/share/mk bsd.kern.mk src/sys/conf Makefile.sparc64
Message-ID:  <20030301164339.W25203-100000@gamplex.bde.org>
In-Reply-To: <20030228114650.GB15259@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Feb 2003, Ruslan Ermilov wrote:

> On Fri, Feb 28, 2003 at 04:54:29PM +1100, Bruce Evans wrote:
> > Don't forget to keep sys/conf/kern.mk in sync with share/mk/bsd.kern.mk.
> > The latter is supposed to go away or be reduced to compatibilty cruft.
> > ...
> Doh, I've completely forgot about this duplication.  How about this?
>
> %%%
> Index: share/mk/bsd.kern.mk
> ===================================================================
> RCS file: /home/ncvs/src/share/mk/bsd.kern.mk,v
> retrieving revision 1.32
> diff -u -r1.32 bsd.kern.mk
> --- share/mk/bsd.kern.mk	27 Feb 2003 23:02:21 -0000	1.32
> +++ share/mk/bsd.kern.mk	28 Feb 2003 11:41:38 -0000
> @@ -1,59 +1,13 @@
>  # $FreeBSD: src/share/mk/bsd.kern.mk,v 1.32 2003/02/27 23:02:21 jake Exp $
>
> [Remove -W options here.]

OK.

> -#
> -# On the alpha, make sure that we don't use floating-point registers and
> -# allow the use of BWX etc instructions (only needed for low-level i/o).
> -# Also, reserve register t7 to point at per-cpu global variables.
> -#
> -.if ${MACHINE_ARCH} == "alpha"
> -CFLAGS+=	-mno-fp-regs -ffixed-8 -Wa,-mev6

Not sure about this.

> +# Search for kernel source tree in standard places.
> +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys

Style bug: line too long.

> +.if !defined(SYSDIR) && exists(${_dir}/conf/kern.mk)
> +SYSDIR=	${_dir}
>  .endif

This search is being cloned too much, with different bug/features.
The above would be the 3rd version.  The others are in mk/bsd.kmod.mk and
conf/kmod.mk.  The bug/features are:
- only bsd.kmod.mk and the above search 4 directories above ${.CURDIR}.
  This is implemented style bug for style bug compatibly (line too long).
- only kmod.mk has a hack to work around a bug in make(1).  See kmod.mk
  rev.1.86 but disbelieve its analysis.  This replaces an existence check
  for kern/ by an existence check for plain kern.  The above replaces
  the extence check by kern/ by one for kern.mk.  bsd.kmod.mk keeps the
  existence check for kern/ and adds one for conf/.

> [More removal of non-warning options.]
> +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern) || !exists(${SYSDIR}/conf/)
> +.error "can't find kernel source tree"
>  .endif
> [More removal of non-warning options.]
> +.include "${SYSDIR}/conf/kern.mk"

Not sure about this.  It seems reasonable to handle things in the same
way as bsd.kmod.mk, but this will just break compiling old sys trees
under -current until the old sys trees have conf/kern.mk.  I had
intended to keep the central bsd.kern.mk working for the old sys trees
at least to begin with (just remove all warning options from it).  This
can be implemented easily by rearranging the ifdefs.

> Index: sys/conf/kern.post.mk
> ===================================================================
> RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v
> retrieving revision 1.35
> diff -u -r1.35 kern.post.mk
> --- sys/conf/kern.post.mk	27 Feb 2003 08:52:11 -0000	1.35
> +++ sys/conf/kern.post.mk	28 Feb 2003 11:38:23 -0000
> @@ -221,4 +221,4 @@
>  majors.o:
>  	${NORMAL_C}
>
> -.include <bsd.kern.mk>
> +.include "kern.mk"

Does the relative path work right here?  It depends on seaching in the
directory of kern.post.mk first.  kern.post.mk is known to be in
$S/conf/ and we could use that path for kern.mk too.

> Index: sys/conf/kmod.mk
> ===================================================================
> RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
> retrieving revision 1.135
> diff -u -r1.135 kmod.mk
> --- sys/conf/kmod.mk	3 Feb 2003 14:46:25 -0000	1.135
> +++ sys/conf/kmod.mk	28 Feb 2003 11:33:01 -0000
> @@ -309,4 +309,4 @@
>  .endif
>
>  .include <bsd.obj.mk>
> -.include <bsd.kern.mk>
> +.include "kern.mk"

We could use ${SYSDIR}/conf/ instead of the relative path here.

> I choose to preserve bsd.kern.mk because at least sys/boot/pc98/boot2
> utilizes it purposedly.

This should use the relative kern.mk too.  pc98/boot2 is essentially
i386/boot/biosboot.  When I added bsd.kern.mk I made all the boot
programs use it to get consistent warnings checking for the sys tree.
This was one of many things lost in the sys/boot tree except in
pc98/boot2.

Bruce


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




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