Date: Mon, 10 Dec 2001 17:10:01 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/32671: Patch to generate usbdevs.h automatically in kernel build Message-ID: <200112110110.fBB1A1v76003@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/32671; it has been noted by GNATS.
From: Bruce Evans <bde@zeta.org.au>
To: "Erik H. Bakke" <ebakke@trolltech.com>
Cc: <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: kern/32671: Patch to generate usbdevs.h automatically in kernel
build
Date: Tue, 11 Dec 2001 12:06:26 +1100 (EST)
On Mon, 10 Dec 2001, Erik H. Bakke wrote:
> >Description:
> This patch will make sure usbdevs.h and usbdevs_data.h are
> regenerated automatically when a kernel is built. It is
> done from the depend target, so the files will be present and
> updated as early as possible in the build process.
> This eliminates the need for separately checked in and maintained
> versions of these files.
>
> >How-To-Repeat:
>
> >Fix:
>
> --- kern.post.mk.bak Sun Nov 11 07:16:53 2001
> +++ kern.post.mk Mon Dec 10 14:10:39 2001
> @@ -76,7 +76,12 @@
>
> ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
>
> -kernel-depend:
> +# This rule makes sure usbdevs.h and usbdevs_data.h are updated from
> +# usbdevs
> +usbdevs:
> + cd ../../../dev/usb && ${MAKE} -f Makefile.usbdevs
> +
> +kernel-depend: usbdevs
> .if defined(EXTRA_KERNELDEP)
> ${EXTRA_KERNELDEP}
> .endif
Er, this clobbers the src tree at kernel build time and has other
problems (it doesn't work unless "make depend" is run first...).
Generated files need to be handled something like the *if.h files, but
without the dependency bugs in that handling. Dependencies for the
latter were broken by excessively zealous cleanups in sys/conf/files*,
so there are only enough dependencies for things to work right if
either "make depend" is run first or .depend doesn't exist (when .depend
doesn't exist, the fudged dependency of all objects on all headers
gives enough dependencies). In general, generated headers must be in
BEFORE_DEPENDS and in all relevant places in .depend for things to
work right.
Bruce
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?200112110110.fBB1A1v76003>
