From owner-svn-src-all@freebsd.org Fri Nov 30 17:07:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5915F1149F63; Fri, 30 Nov 2018 17:07:15 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B68EC6CCA5; Fri, 30 Nov 2018 17:07:14 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wAUH7CIO019143; Fri, 30 Nov 2018 09:07:12 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wAUH7Ce2019142; Fri, 30 Nov 2018 09:07:12 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201811301707.wAUH7Ce2019142@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r341343 - head/share/man/man7 In-Reply-To: To: Warner Losh Date: Fri, 30 Nov 2018 09:07:12 -0800 (PST) CC: "Bjoern A. Zeeb" , =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: B68EC6CCA5 X-Spamd-Result: default: False [-0.97 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; NEURAL_HAM_MEDIUM(-0.62)[-0.619,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.33)[-0.325,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_HAM_SHORT(-0.90)[-0.899,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.02)[country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2018 17:07:15 -0000 > On Fri, Nov 30, 2018 at 9:24 AM Bjoern A. Zeeb < > bzeeb-lists@lists.zabbadoz.net> wrote: > > > On 30 Nov 2018, at 15:56, Edward Tomasz Napierala wrote: > > > > > Author: trasz > > > Date: Fri Nov 30 15:56:14 2018 > > > New Revision: 341343 > > > URL: https://svnweb.freebsd.org/changeset/base/341343 > > > > > > Log: > > > Add an example of rebuilding a single piece of userspace. > > > > > > Modified: > > > head/share/man/man7/development.7 > > > > > > Modified: head/share/man/man7/development.7 > > > > > ============================================================================== > > > --- head/share/man/man7/development.7 Fri Nov 30 15:52:03 > > > 2018 (r341342) > > > +++ head/share/man/man7/development.7 Fri Nov 30 15:56:14 > > > 2018 (r341343) > > > @@ -118,6 +118,14 @@ After reboot: > > > cd src > > > make -j8 installworld > > > reboot > > > +.Ed > > > +.Pp > > > +Rebuild and reinstall a single piece of userspace, in this > > > +case > > > +.Xr ls 1 : > > > +.Bd -literal -offset indent > > > +cd src/bin/ls > > > +make clean all install > > > > I always thought the proper sequence was: make clean cleandepend obj > > depend all install make clean && make cleandepend && make obj && \ make depend && make all && make install If you do not use the && jointers you may actually end up installing a binary that was from the last build.... or other not so nice side effects from not stopping your command sequence on failure. > > > > However I have recently figured that it?s not actually true as > > building inside an individual user space source directory seems to pick > > up headers etc from the installed machine and not from the source tree. > > I keep arguing with myself if that had always been the case or not.. I > > am sure some people here do know better than me (so please see this as > > asking for help/advise). The original BSD 4.4 lite case, and hence early FreeBSD up to some point, was that all builds, other than the kernel which is self isolated by design, picked up the installed include files from /usr/include. This is what lead to the original top level Makefile target make includes which populates DESTDIR/usr/include from the files in the src tree you are rooted at. There was also an associated knob whos name is escaping me right now that says to make the DESTDIR/usr/include hierarchy symlinks into the source tree, thus in effect making your userland builds always use the header files from the current src tree. > > > > obj and depend are now optional (they are now reconstructed the first time > something builds), but used to be required though sometime in the 9.x/10.x > series. Except for on super-weird case involving FS level corruption, I've > never needed these targets since the cut-over. obj was orignally optional, and hopefully has always been and still is optional. Also true of depend, but you might not get what you wanted/ expected if you do not make the .depends files if your editing the src's and recompiling. If your just building from a "clean" src/obj pair there should be no need for depend until you edit something, then you need to run a depend build so that make knows what to rebuild. > cleandepend may be required in some weird edge cases, but it's rarely > needed that you can omit it most of the time. It used to be required > whenever the dependencies changed as part of the build. That's mostly, but > not entirely, fixed today. cleandepend was traditionally required when depencies changed in a way that caused the contents of the .depend file to be incorrect. If .depend is dependent on every file listed in the .depend file and Makefile and .mk files make depend should be able to do the right thing all the time. I never got to this idea back in the day, .depend files had no depencies and the user had to know when they effected the dependency graph and to run a make cleandepend && make depend pass. > Warner -- Rod Grimes rgrimes@freebsd.org