git: kernel: Add simpler make depend variant for kernel.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Tue May 29 00:01:24 PDT 2018


commit 319f97f77182b64c8785d66eb06b219b3d8f4801
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Mon May 28 18:07:31 2018 +0300

    kernel: Add simpler make depend variant for kernel.
    
    For now only for make {build,native}kernel -DNO_MODULES. The modules part
    is more involved and will follow next.
    
    Idea is to avoid a seprate mkdep(1) run before the actual compilation by
    simply writing out separate dependency files while compiling in one go.
    This variant reuses depenency information from last compilation, while
    mkdep(1) variant reconstructs the dep chains on the current tree.
    Depending if headers where removed or added both variants can miss out.
    
    Due to several constraints (checks in makefiles if .depend file already
    exists and implicit handling of device firmware stub files) try to mimic
    previous behaviour by reconstructing depend on next quickkernel.
    Later on we could remove anchoring on hack.So, creation of .depend file
    and include all foo.d dependency files directly using bmake's .dinclude
    directive that acts on stale dependencies as .MAKE.DEPENDFILE .depend.
    Also turns out mkdep(1) was not tracking deps for ${MFILES:S/.m$/.c/}},
    this simpler variant catches them and only vmx_genassym.d is not hooked
    in .depend (coming from sys/platform/pc64/conf/files).
    Shaves ~30s for make -jN nativekernel -DNO_MODULES.

Summary of changes:
 sys/conf/kern.post.mk | 10 ++++++++++
 sys/conf/kern.pre.mk  |  5 +++++
 2 files changed, 15 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/319f97f77182b64c8785d66eb06b219b3d8f4801


-- 
DragonFly BSD source repository


More information about the Commits mailing list