Changeset 228560f in rtems-docs


Ignore:
Timestamp:
Mar 20, 2017, 9:41:41 PM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
e7f009e
Parents:
f97be09
Message:

waf: Create the sphinx rule in one place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/waf.py

    rf97be09 r228560f  
    229229                          "(https://github.com/remy/inliner)")
    230230
     231def sphinx_cmdline(ctx, build_type, conf_dir, doctrees, source_dir, output_dir):
     232    rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
     233           (sphinx_verbose(ctx), build_type, conf_dir, version_cmdline(ctx),
     234            doctrees, source_dir, output_dir)
     235    return rule
     236
    231237def doc_pdf(ctx, source_dir, conf_dir):
    232238    buildtype = 'latex'
    233239    build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
    234240    pdf_resources(ctx, buildtype)
    235     rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
    236            (sphinx_verbose(ctx), buildtype, conf_dir, version_cmdline(ctx),
    237             doctrees, source_dir, output_dir)
     241    rule = sphinx_cmdline(ctx, buildtype, conf_dir, doctrees, source_dir, output_dir)
    238242    ctx(
    239243        rule         = rule,
     
    285289    build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
    286290    html_resources(ctx, buildtype)
    287     rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
    288            (sphinx_verbose(ctx), buildtype, conf_dir, version_cmdline(ctx),
    289             doctrees, source_dir, output_dir)
     291    rule = sphinx_cmdline(ctx, buildtype, conf_dir, doctrees, source_dir, output_dir)
    290292    ctx(
    291293        rule         = rule,
     
    307309    build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
    308310    html_resources(ctx, buildtype)
    309     rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
    310            (sphinx_verbose(ctx), buildtype, conf_dir, version_cmdline(ctx),
    311             doctrees, source_dir, output_dir)
     311    rule = sphinx_cmdline(ctx, buildtype, conf_dir, doctrees, source_dir, output_dir)
    312312    ctx(
    313313        rule         = rule,
     
    344344                   help = "Sphinx verbose.")
    345345    ctx.add_option('--pdf',
    346                    action='store_true',
     346                   action = 'store_true',
    347347                   default = False,
    348348                   help = "Build PDF.")
    349349    ctx.add_option('--singlehtml',
    350                    action='store_true',
     350                   action = 'store_true',
    351351                   default = False,
    352352                   help = "Build Single HTML file, requires Node Inliner")
Note: See TracChangeset for help on using the changeset viewer.