Suppose here $ (1) =target,
The
Target/builddirs = Linux SDK imagebuilder toolchain
subtargets = clean download prepare compile install update refresh Prereq Dist Distcheck Configure
buildtypes-$ (BD) =
# Parameters: <subdir> define SubDir $ (call warn,$ (1), D,d $ (1)) $ (foreach bd,$ ($ (1)/builddirs), $ (call Warn, $ (1), D,BD $ (1)/$ (BD)) $ (foreach target,$ (subtargets), $ (foreach btype,$ (buildtypes-$ (BD)), $ (Call Warn_e val,$ (1)/$ (BD), t,t,$ (1)/$ (BD)/$ (btype)/$ (target): $ (if $ (QUILT),, $ ($ (1)/$ (BD)/$ (btype)/$ (target) $ (call $ (1)//$ ( btype)/$ (target), $ (1)/$ (BD)/$ (btype))) $ (if $ (call debug,$ (1)/$ (BD), V),, @) +$$ (submake)-C $ (1)/$ (BD) $ (btype)-$ (target) $ (if $ (findstring $ (BD), $ ($ (1)/builddirs-ignore-$ (btype)-$ (target))), | | $ (call error,$ (1), ERROR: $ (1)/$ (BD)
[$ (btype)] failed to build.)) $ (if $ (call diralias,$ (BD)), $ (call warn_eval,$ (1)/$ (BD), l,t,$ (1)/$ (call diralias,$ (BD))/$ (btype)/$ (target): $ (1)/$ ( BD)/$ (btype)/$ (target))) $ (call warn_eval,$ (1)/$ (BD), t,t,$ (1)/$ (BD)/$ (target): $ (if $ (QUILT), $ ($ (1)/$ (BD)/$ (target)) $ (Call $ (1)//$ (target), $ (1)/$ (BD))) $ (if $ (build_log), @mkdir-P $ (build_log_dir)/$ (1)/$ (BD)) $ (foreach variant,$ (if $ (build_variant), $ (build_variant), $ (if $ (strip $ ($ (1)/$ (BD)/variants), $ ($ (1)/$ (BD)/variants), $ (if $ ( $ (1)/$ (BD)/default-variant), $ ($ (1)/$ (BD)/default-variant), __default)), $ (if $ (call debug,$ (1)/$ (BD), V), @) +$ (if $ (Build_log), Set-o pipefail;) $$ (Submake)-C $ (1)/$ (BD) $ (target) build_variant= "$ (filter-out __default,$ (VARIANT))" $ ( If $ (build_log), silent= 2>&1 | Tee $ (Build_log_dir)/$ (1)/$ (BD)/$ (target). txt) $ (if $ (findstring $ (BD), $ ($ (1)/builddirs-ignore-$ (target)), | | $ ( Call error,$ (1), ERROR: $ (1)/$ (BD) failed to build$ (if $ (filter-out __default,$ (variant)), (Build variant: $ (variant))). )) $ (if $ (prereq_only) $ (dump_target_db), # aliases $ (if $ (call diralias,$ (BD)), $ (call War n_eval,$ (1)/$ (BD), l,t,$ (1)/$ (call diralias,$ (BD))/$ (target): $ (1)/$ (BD)/$ (target)))) $ (foreach target,$ (Subtargets), $ (call subtarget,$ (1), $ (target))) Endef