VirtualBox

Changeset 3284 in kBuild


Ignore:
Timestamp:
Jan 5, 2019 1:40:31 AM (6 years ago)
Author:
bird
Message:

footer-pass2-compiling-targets.kmk,units: Added a dedicated pass 2 variable for units to put their intermediates in so as to not mess with inheritance or for us to do silly things wrt expansion for every property variant. Only the new variable is now always listed as an order-only dependency for each source compilation rule.

Location:
trunk/kBuild
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer-pass2-compiling-targets.kmk

    r3280 r3284  
    9292 define def_target_source_rule_v3plus_objcache
    9393_OUT_FILES += $(outbase).koc
    94 $(outbase).koc +| $(obj) $(kbsrc_output) $(kbsrc_output_maybe) : $(kbsrc_depend) | $(kbsrc_depord) $(target_intermediate_vars)
     94$$(outbase).koc +| $$(obj) $$(kbsrc_output) $$(kbsrc_output_maybe) : $$(kbsrc_depend) | $$(kbsrc_depord) $(target_intermediate_vars)
    9595        %$$(call MSG_COMPILE,$(target),$(source),$$@,$(type))
    9696
     
    546546othersrc          :=
    547547$(target)_2_OBJS  :=
     548$(target)_2_INTERMEDIATES =
    548549
    549550# kObjCache.
     
    556557local use_objcache :=
    557558endif
    558 
    559 # target level intermediates
    560 local target_intermediate_vars := $(foreach var, \
    561         $(target)_INTERMEDIATES \
    562         $(target)_INTERMEDIATES.$(bld_trg) \
    563         $(target)_INTERMEDIATES.$(bld_trg).$(bld_trg_arch) \
    564         $(target)_INTERMEDIATES.$(bld_trg_arch) \
    565         $(target)_INTERMEDIATES.$(bld_trg_cpu) \
    566         $(target)_INTERMEDIATES.$(bld_type) \
    567         ,$(if-expr defined($(var)),$$$$($(var)),))
    568 #$(info target_intermediate_vars=$(target_intermediate_vars))
    569559
    570560# Do units pre source callouts.
     
    577567$(foreach unit,$(units),$(evalvalctx def_unit_$(unit)_target_pre))
    578568$(foreach unit,$(units),$(evalvalctx def_unit_$(unit)_target_pre_2))
     569
     570# target level intermediates
     571local target_intermediate_vars := $$$$($(target)_2_INTERMEDIATES) $(foreach var, \
     572        $(target)_INTERMEDIATES \
     573        $(target)_INTERMEDIATES.$(bld_trg) \
     574        $(target)_INTERMEDIATES.$(bld_trg).$(bld_trg_arch) \
     575        $(target)_INTERMEDIATES.$(bld_trg_arch) \
     576        $(target)_INTERMEDIATES.$(bld_trg_cpu) \
     577        $(target)_INTERMEDIATES.$(bld_type) \
     578        ,$(if-expr defined($(var)),$$$$($(var)),))
    579579
    580580# source -> object
     
    772772othersrc          :=
    773773$(target)_2_OBJS  :=
     774$(target)_2_INTERMEDIATES =
    774775
    775776# kObjCache.
     
    782783local use_objcache :=
    783784endif
    784 
    785 # target level intermediates
    786 local target_intermediate_vars := $(foreach var, \
    787         $(target)_INTERMEDIATES \
    788         $(target)_INTERMEDIATES.$(bld_trg) \
    789         $(target)_INTERMEDIATES.$(bld_trg).$(bld_trg_arch) \
    790         $(target)_INTERMEDIATES.$(bld_trg_arch) \
    791         $(target)_INTERMEDIATES.$(bld_trg_cpu) \
    792         $(target)_INTERMEDIATES.$(bld_type) \
    793         ,$(if-expr defined($(var)),$$$$($(var)),))
    794 #$(info target_intermediate_vars=$(target_intermediate_vars))
    795785
    796786# Do units pre source callouts.
     
    803793$(foreach unit,$(units),$(evalvalctx def_unit_$(unit)_target_pre))
    804794$(foreach unit,$(units),$(evalvalctx def_unit_$(unit)_target_pre_2))
     795
     796# target level intermediates
     797local target_intermediate_vars := $$$$($(target)_2_INTERMEDIATES) $(foreach var, \
     798        $(target)_INTERMEDIATES \
     799        $(target)_INTERMEDIATES.$(bld_trg) \
     800        $(target)_INTERMEDIATES.$(bld_trg).$(bld_trg_arch) \
     801        $(target)_INTERMEDIATES.$(bld_trg_arch) \
     802        $(target)_INTERMEDIATES.$(bld_trg_cpu) \
     803        $(target)_INTERMEDIATES.$(bld_type) \
     804        ,$(if-expr defined($(var)),$$$$($(var)),))
    805805
    806806# source -> object
  • trunk/kBuild/units/dtrace.kmk

    r3160 r3284  
    3333
    3434ifdef UNIT_dtrace
    35  $(error kBuild: The lex unit was included twice!)
     35 $(error kBuild: The dtrace unit was included twice!)
    3636endif
    3737UNIT_dtrace = dtrace
     
    9191# update globals
    9292_OUT_FILES += $(out)
    93 $(target)_INTERMEDIATES += $(out)
     93$(target)_2_INTERMEDIATES += $(out)
    9494
    9595endef # def_dtrace_hdr_rule
     
    134134$(target)_2_OBJS <= $(out)
    135135
    136 endef # def_dtrace_hdr_rule
     136endef # def_dtrace_obj_rule
    137137
    138138
  • trunk/kBuild/units/lex.kmk

    r3160 r3284  
    8888_OUT_FILES += $(out) $(output_extra) $(output_maybe)
    8989$(target)_GEN_SOURCES_ += $(out)
    90 $(target)_INTERMEDIATES += $(intermediates)
     90$(target)_2_INTERMEDIATES += $(intermediates)
    9191
    9292endef # def_lex_rule
  • trunk/kBuild/units/qt3.kmk

    r3121 r3284  
    513513endif
    514514
    515 $(target)_INTERMEDIATES += $(realout.h)
     515$(target)_2_INTERMEDIATES += $(realout.h)
    516516$(target)_GEN_SOURCES_ += $(realout.cpp)
    517517$(target)_CLEAN += $(out.h) $(out.cpp) $(realout.h) $(realout.cpp) $(more_output) $(maybe_output) $(dep)
     
    602602endif
    603603
    604 $(target)_INTERMEDIATES += $(realout)
     604$(target)_2_INTERMEDIATES += $(realout)
    605605$(target)_GEN_SOURCES_ += $(realout)
    606606$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
     
    693693endif
    694694
    695 $(target)_INTERMEDIATES += $(realout)
     695$(target)_2_INTERMEDIATES += $(realout)
    696696$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    697697
  • trunk/kBuild/units/qt4.kmk

    r3121 r3284  
    611611endif
    612612
    613 $(target)_INTERMEDIATES += $(realout)
     613$(target)_2_INTERMEDIATES += $(realout)
    614614$(target)_GEN_SOURCES_ += $(realout)
    615615$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
     
    698698endif
    699699
    700 $(target)_INTERMEDIATES += $(realout)
     700$(target)_2_INTERMEDIATES += $(realout)
    701701$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    702702
     
    784784endif
    785785
    786 $(target)_INTERMEDIATES += $(realout)
     786$(target)_2_INTERMEDIATES += $(realout)
    787787$(target)_GEN_SOURCES_ += $(realout)
    788788$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
     
    877877endif
    878878
    879 $(target)_INTERMEDIATES += $(realout)
     879$(target)_2_INTERMEDIATES += $(realout)
    880880$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    881881
  • trunk/kBuild/units/qt5.kmk

    r3160 r3284  
    641641endif
    642642
    643 $(target)_INTERMEDIATES += $(realout)
     643$(target)_2_INTERMEDIATES += $(realout)
    644644$(target)_GEN_SOURCES_ += $(realout)
    645645$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
     
    735735endif
    736736
    737 $(target)_INTERMEDIATES += $(realout)
     737$(target)_2_INTERMEDIATES += $(realout)
    738738$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    739739
     
    828828endif
    829829
    830 $(target)_INTERMEDIATES += $(realout)
     830$(target)_2_INTERMEDIATES += $(realout)
    831831$(target)_GEN_SOURCES_ += $(realout)
    832832$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
     
    928928endif
    929929
    930 $(target)_INTERMEDIATES += $(realout)
     930$(target)_2_INTERMEDIATES += $(realout)
    931931$(target)_CLEAN += $(out) $(realout) $(more_output) $(maybe_output) $(dep)
    932932
  • trunk/kBuild/units/yacc.kmk

    r3121 r3284  
    8383_OUT_FILES += $(out) $(output_extra) $(output_maybe)
    8484$(target)_GEN_SOURCES_ += $(out)
    85 $(target)_INTERMEDIATES += $(intermediates)
     85$(target)_2_INTERMEDIATES += $(intermediates)
    8686
    8787endef # def_yacc_rule
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette