Source Build Question

Matthew Seaman matthew at freebsd.org
Mon Jan 26 15:47:38 UTC 2015


On 01/26/15 15:11, Rick Miller wrote:
> Hi all,
> 
> The output below is an excerpt from 2 source builds of the same source
> (releng/10.0) on 2 different hosts.  The obvious difference is "all" vs
> "depend", but what exactly does this signify and does it impact the
> performance of a build?
> 
> /*** Source build, Host 1 ***/
> ===> lib/clang/libllvmanalysis (all)
> ===> lib/clang/libllvmarchive (all)
> ===> lib/clang/libllvmasmparser (all)
> ===> lib/clang/libllvmasmprinter (all)
> ===> lib/clang/libllvmbitreader (all)
> ===> lib/clang/libllvmbitwriter (all)
> 
> /*** Source build, Host 2 ***/
> ===> lib/clang/libllvmanalysis (depend)
> ===> lib/clang/libllvmarchive (depend)
> ===> lib/clang/libllvmasmparser (depend)
> ===> lib/clang/libllvmasmprinter (depend)
> ===> lib/clang/libllvmbitreader (depend)
> ===> lib/clang/libllvmbitwriter (depend)
> 

If you're starting from a pristine, newly checked-out source tree in
/usr/src and an empty /usr/obj in both cases, then you should see the
'depend' target getting processed fairly early in the build.  It's
analysing each file of C code to find what headers each depends on.
Once this analysis has been done, and the results saved to '.depend'
files scattered around various directories under /usr/obj, then there's
no need to repeat that step unless any of the C code files are newer
(ie. more recently modified) than the generated .depend files.

On second and subsequent builds in the same source tree, you may not see
the depends being processed again.  A simple 'make clean' doesn't
(IIRC) remove the generated .depend files -- for that you need to run
'make cleandir ; make cleandir' (Yes, the same thing twice.) or
destroying and recreating /usr/obj some other way.  It's often faster to
have that as a separate partition, and then drop and recreate the
filesystem on it than to go around deleting all the files in that
directory tree.

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20150126/8b902729/attachment.sig>


More information about the freebsd-questions mailing list