Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2003 15:24:05 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Bruce Evans <bde@zeta.org.au>
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:  <20030301132405.GC77007@sunbay.com>
In-Reply-To: <20030301164339.W25203-100000@gamplex.bde.org>
References:  <20030228114650.GB15259@sunbay.com> <20030301164339.W25203-100000@gamplex.bde.org>

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

--S1BNGpv0yoYahz37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Mar 01, 2003 at 05:41:04PM +1100, Bruce Evans wrote:
> On Fri, 28 Feb 2003, Ruslan Ermilov wrote:
>=20
> > 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
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > 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 E=
xp $
> >
> > [Remove -W options here.]
>=20
> OK.
>=20
> > -#
> > -# On the alpha, make sure that we don't use floating-point registers a=
nd
> > -# 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} =3D=3D "alpha"
> > -CFLAGS+=3D	-mno-fp-regs -ffixed-8 -Wa,-mev6
>=20
> Not sure about this.
>=20
> > +# Search for kernel source tree in standard places.
> > +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../=
.. /sys /usr/src/sys
>=20
> Style bug: line too long.
>=20
> > +.if !defined(SYSDIR) && exists(${_dir}/conf/kern.mk)
> > +SYSDIR=3D	${_dir}
> >  .endif
>=20
I just cut-n-pasted bsd.kmod.mk, with s/kmod/kern/ substitution.

> 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/.
>=20
> > [More removal of non-warning options.]
> > +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern) || !exists(${SYSDIR}/c=
onf/)
> > +.error "can't find kernel source tree"
> >  .endif
> > [More removal of non-warning options.]
> > +.include "${SYSDIR}/conf/kern.mk"
>=20
> 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.
>=20
It won't.  One needs to use "make buildkernel" to compile old
kernels, and to downgrade in general, and that would use native
=2Emk's.

> 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.
>=20
> > Index: sys/conf/kern.post.mk
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > 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"
>=20
> Does the relative path work right here?  It depends on seaching in the
> directory of kern.post.mk first.
>=20
Yes, I wanted to make it explicit that we use the same directory
as the including (kern.post.mk) makefile.  It will always work,
and stop on the first attempt from this list:

: If double quotes are used, the including makefile's directory and
: any directories specified using the -I option are searched before
: the system makefile directory.

> kern.post.mk is known to be in
> $S/conf/ and we could use that path for kern.mk too.
>=20
Maybe, I just don't see much difference to the "kern.mk"
version.

> > Index: sys/conf/kmod.mk
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > 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"
>=20
> We could use ${SYSDIR}/conf/ instead of the relative path here.
>=20
Ditto.  "kern.mk" makes it explicit that we use the including
makefile's directory.  IMO, this is more readable.

> > I choose to preserve bsd.kern.mk because at least sys/boot/pc98/boot2
> > utilizes it purposedly.
>=20
> 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.
>=20
If I fix pc98/boot2/Makefile, may I remove the bsd.kern.mk
completely?

%%%
Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/boot/pc98/boot2/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	30 Jan 2003 14:50:25 -0000	1.14
+++ Makefile	1 Mar 2003 13:20:34 -0000
@@ -102,5 +102,5 @@
=20
 CLEANFILES+=3D	machine
=20
-.include <bsd.kern.mk>
+.include "${.CURDIR}/../../../conf/kern.mk"
 .include <bsd.prog.mk>
%%%


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--S1BNGpv0yoYahz37
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+YLR1Ukv4P6juNwoRAs7aAJ90q2recvWAuOiCEG4o7IEpPv64twCfSl74
MR5CCMvFqO2blPa6NmkjSGU=
=U2jz
-----END PGP SIGNATURE-----

--S1BNGpv0yoYahz37--

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




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