Subset Analysis of makefile function in OpenWrt

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.