From owner-cvs-all@FreeBSD.ORG Thu Apr 21 18:59:32 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CBA616A4CE; Thu, 21 Apr 2005 18:59:32 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEFB643D31; Thu, 21 Apr 2005 18:59:30 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j3LJ2b4a005760; Thu, 21 Apr 2005 22:02:37 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 17366-12; Thu, 21 Apr 2005 21:59:20 +0300 (EEST) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j3LJ2apX005757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Apr 2005 22:02:36 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.3/8.13.3) id j3LIxPEf085867; Thu, 21 Apr 2005 21:59:25 +0300 (EEST) (envelope-from ru) Date: Thu, 21 Apr 2005 21:59:25 +0300 From: Ruslan Ermilov To: Bruce Evans Message-ID: <20050421185925.GA85015@ip.net.ua> References: <200504182110.j3ILAc8J031298@repoman.freebsd.org> <20050418.152011.74745144.imp@bsdimp.com> <20050419182938.GA27941@dragon.NUXI.org> <20050420055904.GA33015@ip.net.ua> <20050420161212.GA52582@dragon.NUXI.org> <20050421125501.W88810@delplex.bde.org> <20050421070011.GA81229@ip.net.ua> <20050421171036.Q2082@epsplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20050421171036.Q2082@epsplex.bde.org> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Warner Losh cc: David O'Brien Subject: Re: cvs commit: src/sys/conf kmod.mk X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2005 18:59:32 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 21, 2005 at 05:43:25PM +1000, Bruce Evans wrote: > The depend target doesn't, and possibly can't or shouldn't have enough > dependencies to know whether .depend should be rebuilt. This is handled > in a different way in kernel makefiles. Kernel makefiles always > rebuild, and application makefiles only rebuilt if one of the depended-on > files that they know about (mainly *.c) has changed. I'm fairly happy > with this different behaviour. >=20 That's where we have a problem -- some of us are happy with the behavior, some of us want all be similar, and some of us don't like it. (I don't.) > The kernel is self-contained (at least > if you don't use the modules mistake), so it is easy to tell when its > .depend file should be rebuilt and avoid doing it unnecessarily, and > if you do it unnecessarily it only takes a short time to rebuild. >=20 Short time -- maybe. I still consider it a major mistake that "make depend" followed by "make depend" does something -- it shouldn't. > OTOH, > "make depend" for the src tree would rebuild hundreds of makefiles if > it always rebuilt. >=20 Of .depend files, yes. This is evil. > Another dependency bug that sometimes bites me: "make" doesn't work > after "make clean", at least under the old version of -current that I > use, because dependencies for lots of generated sources (like device_if.c > (?)) are missing. Dependencies for older generated files like > vnode_if.c are handled correctly, and "make depend" doesn't have > the problem because the necessary dependencies are in BEFORE_DEPEND. >=20 Maybe this is only an old bug, as there are these lines in kern.post.mk: =2Eif !exists(${.OBJDIR}/.depend) ${SYSTEM_OBJS}: assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.= h/} =2Eendif At least "make -n kernel >/dev/null" after "make clean" doesn't complain now. > >I proposed the following: with NO_CLEAN builds, default to always > >regenerating .depend files (by moving the old .depend files out of > >the way like is done in kern.post.mk), but provide a mean to skip > >regenerating .depend files, NO_CLEANDEPEND. >=20 > My version hasn't lost the support for not building .depend files > (which is just a pessimization on the !NOCLEAN^H^H^H^H^H_CLEAN case). > It has a knob _NODEPEND which is always set in the NOCLEAN case and > can be set by the user in the !NOCLEAN case to prevent building of > .depend files. It removes old .depend files instead of moving them > out of the way as in bsd.prog.mk: >=20 > %%% > .if !defined(NOCLEAN) > _NODEPEND=3D true > .endif > .if defined(_NODEPEND) > DEPEND=3D cleandepend > .else > DEPEND=3D depend > .endif > %%% >=20 > (Then s/depend/${DEPEND} almost everywhere else.) >=20 > I think the default for NOCLEAN should be to not rebuild dependencies. > It is supposed to be fast at the expense of correctness. >=20 So do I, but I also want it to be a case for the kernel build. > You often > want it to restart a build from where it failed, and then you don't > especially want it to rebuild all the makefiles before that point. >=20 Yes, agreed. In case of upgrades, it's easy to "make cleandepend" first. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCZ/gNqRfpzJluFF4RAicWAKCKZGpcks32Dp42l4tCI8qcVdGi3gCdEZtT Jyhydp8NQ1sRdGnXBFBzEvo= =JsRy -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--