Subject: Re: where to build ndiscvt?
To: Greg Troxel <gdt@ir.bbn.com>
From: Alan Ritter <ritter.alan@gmail.com>
List: tech-kern
Date: 04/21/2006 14:18:43
------=_Part_2100_29447816.1145654323501
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On 4/20/06, Greg Troxel <gdt@ir.bbn.com> wrote:
> "Alan Ritter" <ritter.alan@gmail.com> writes:
>
> > Would this imply not including it in the distribution at all, but only
> > adding a src/tools/ndiscvt?
>
> No, it would be like make, and cc, tsort and zic, and all the other
> things in src/tools. The program would be compiled normally and
> available in userland in addition to being available as a host tool.
>
> > ndiscvt will really only be used to build a new kernel, so I can see
> > the argument that it is a tool, but at the same time it will most
> > likely be run by hand instead of from an automated script. It might be
> > a bit teadeous for users who just want their laptop network card to
> > work to have to build a new toolchain. But perhaps I'm
> > misunderstanding.
>
> I didn't mean to imply it should be host tool only, and not also
> normally built.
>
> I think that after putting ndiscvt someplace (presumably /usr/sbin)
> then all one needs to do is add a src/tools/ndiscvt/Makefile with a
> few lines in it. This will make nbndiscvt in
> [TOOLDIR=3D/usr/obj/tools]/bin, in addition to /usr/sbin/ndiscvt
>
> Normal users won't use it as a host tool, just as a regular program.
OK, here's a makefile that seems to work (Martin helped me out with this).
A diff of src/tools/Makefile is also included below, hopefully I have
ndiscvt in the right place. Should I go ahead and commit these
changes so that ndiscvt is built with the tools?
note: I haven't yet tested building ndiscvt on all architectures. So
far it's been tested on i386 and sparc64.
Thanks!
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: /cvsroot/src/tools/Makefile,v
retrieving revision 1.95
diff -u -r1.95 Makefile
--- Makefile 1 Apr 2006 20:21:30 -0000 1.95
+++ Makefile 21 Apr 2006 21:06:32 -0000
@@ -33,7 +33,7 @@
${TOOLCHAIN_BITS} \
asn1_compile cat cksum compile_et config db \
file lint1 \
- makefs menuc mkcsmapper mkesdb mklocale mknod msgc \
+ makefs menuc mkcsmapper mkesdb mklocale mknod msgc ndiscvt =
\
pax .WAIT \
disklabel .WAIT \
fdisk .WAIT \
------=_Part_2100_29447816.1145654323501
Content-Type: application/octet-stream; name=Makefile
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="Makefile"
# $NetBSD$
HOSTPROGNAME= ${_TOOL_PREFIX}ndiscvt
HOST_SRCDIR= usr.sbin/ndiscvt
HOST_CPPFLAGS+= -I${.CURDIR}/../../${HOST_SRCDIR} -I${.CURDIR} -I${.CURDIR}/../../sys
.include "${.CURDIR}/../Makefile.host"
------=_Part_2100_29447816.1145654323501--