Changeset f7a09b5 in rtems-libbsd for freebsd-to-rtems.py


Ignore:
Timestamp:
Mar 26, 2018, 4:14:52 AM (20 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, 4a77611a223ea883fb548679b516d326a020d447
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
  • freebsd-to-rtems.py

    r8189ea8 rf7a09b5  
    4343
    4444import builder
    45 import waf_generator
    4645import libbsd
    4746
    4847isForward = True
    4948isEarlyExit = False
    50 isOnlyBuildScripts = False
    5149statsReport = False
    5250
     
    5856    print("  -e|--early-exit   evaluate arguments, print results, and exit")
    5957    print("  -m|--makefile     Warning: depreciated and will be removed ")
    60     print("  -b|--buildscripts just generate the build scripts")
    6158    print("  -S|--stats        Print a statistics report")
    6259    print("  -R|--reverse      default origin -> LibBSD, reverse that")
     
    6865def parseArguments():
    6966    global isForward, isEarlyExit, statsReport
    70     global isOnlyBuildScripts
    7167    try:
    7268        opts, args = getopt.getopt(sys.argv[1:],
     
    10197        elif o in ("-e", "--early-exit"):
    10298            isEarlyExit = True
    103         elif o in ("-b", "--buildscripts") or o in ("-m", "--makefile"):
    104             isOnlyBuildScripts = True
    10599        elif o in ("-S", "--stats"):
    106100            statsReport = True
     
    120114print("Dry Run:                     %s" % (("no", "yes")[builder.isDryRun]))
    121115print("Diff Mode Enabled:           %s" % (("no", "yes")[builder.isDiffMode]))
    122 print("Only Generate Build Scripts: %s" % (("no", "yes")[isOnlyBuildScripts]))
    123116print("LibBSD Directory:            %s" % (builder.LIBBSD_DIR))
    124117print("FreeBSD Directory:           %s" % (builder.FreeBSD_DIR))
     
    144137else:
    145138    print("Reverting from", builder.LIBBSD_DIR)
    146     if isOnlyBuildScripts == True:
    147         print("error: Build Script generation and Reverse are contradictory")
    148         sys.exit(2)
    149139
    150140if isEarlyExit == True:
     
    153143
    154144try:
    155     wafGen = waf_generator.ModuleManager()
    156     libbsd.sources(wafGen)
    157     if not isOnlyBuildScripts:
    158         wafGen.processSource(isForward)
    159     wafGen.generate(libbsd.rtems_version())
     145    build = builder.ModuleManager()
     146    libbsd.loadModules(build)
     147    build.processSource(isForward)
    160148    builder.changedFileSummary(statsReport)
    161149except IOError as ioe:
Note: See TracChangeset for help on using the changeset viewer.