Changeset f7a09b5 in rtems-libbsd for wscript


Ignore:
Timestamp:
Mar 26, 2018, 4:14:52 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, 9dd0bc27e3338bad08eaaf52d03265d2e7b9b4f7, 7027254d293cf3a8c888bd9f25052e96f458bc67, d164b840c3973e0793da1b3e4142b1711514b9ba
Children:
d797c5d
Parents:
8189ea8
git-author:
Chris Johns <chrisj@…> (03/26/18 04:14:52)
git-committer:
Christian Mauderer <christian.mauderer@…> (04/10/18 06:54:52)
Message:

waf: Support building from libbsd.py directly from waf.

Remove the need to generate a waf script.

Move various pieces of data from the builder code to libbsd.py and make
it configuration data.

Update #3351

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r8189ea8 rf7a09b5  
    4242    sys.exit(1)
    4343
    44 import libbsd_waf
     44import libbsd
     45import waf_libbsd
     46
     47builder = None
     48
     49def create_builder():
     50    global builder
     51    if builder is None:
     52        builder = waf_libbsd.Builder()
     53        libbsd.load(builder)
     54        builder.generate(rtems_version)
    4555
    4656def init(ctx):
     57    create_builder();
    4758    rtems.init(ctx, version = rtems_version, long_commands = True)
    48     libbsd_waf.init(ctx)
     59    builder.init(ctx)
    4960
    5061def options(opt):
     62    create_builder();
    5163    rtems.options(opt)
    5264    opt.add_option("--enable-auto-regen",
     
    7486                   dest = "optimization",
    7587                   help = "Set optimization level to OPTIMIZATION (-On compiler flag). Default is 2 (-O2).")
    76     libbsd_waf.options(opt)
     88    builder.options(opt)
    7789
    7890def bsp_configure(conf, arch_bsp):
     91    create_builder();
    7992    conf.check(header_name = "dlfcn.h", features = "c")
    8093    conf.check(header_name = "rtems/pci.h", features = "c", mandatory = False)
     
    8396    if rtems.check_networking(conf):
    8497        conf.fatal("RTEMS kernel contains the old network support; configure RTEMS with --disable-networking")
    85     libbsd_waf.bsp_configure(conf, arch_bsp)
     98    builder.bsp_configure(conf, arch_bsp)
    8699
    87100def configure(conf):
     101    create_builder();
    88102    if conf.options.auto_regen:
    89103        conf.find_program("lex", mandatory = True)
     
    96110    conf.env.OPTIMIZATION = conf.options.optimization
    97111    rtems.configure(conf, bsp_configure)
    98     libbsd_waf.configure(conf)
     112    builder.configure(conf)
    99113
    100114def build(bld):
     115    create_builder();
    101116    rtems.build(bld)
    102     libbsd_waf.build(bld)
     117    builder.build(bld)
Note: See TracChangeset for help on using the changeset viewer.